Squid_ The Definitive Guide - Duane Wessels [198]
Related
dns_defnames, hosts_file
Name
tcp_recv_bufsize
Synopsis
If you use this directive, Squid sets the receive buffer size for each TCP socket that it creates. This value refers to the amount of data that the TCP/IP stack will buffer on behalf of the application. You can see how much data is being buffered at any given time by looking at the Recv-Q column of netstat -n output. Larger TCP buffers lead to increased memory usage and better performance.
In general, you shouldn't need to use this directive. Most operating systems in use today have default TCP buffer sizes greater than 32 KB. Empirical evidence suggests that fewer than 5% of typical web objects are larger than 32 KB.
When tcp_recv_bufsize is set to 0, Squid doesn't change the TCP buffer size from its default value.
Syntax
tcp_recv_bufsize size-specification
Default
tcp_recv_bufsize 0
Example
tcp_recv_bufsize 8 kb
Name
err_html_text
Synopsis
This directive is one way to customize Squid's error messages. The error message files contain printf-like tokens. Squid dynamically replaces the tokens with appropriate values for each error. If Squid encounters the token %L, it inserts the contents of this directive. Note that none of the default error messages contain a %L. Thus, to use this feature, you must modify the default error files.
Syntax
err_html_text character string
Default
No default
Example
err_html_text Call 555-
1234 to report problems with Squid.
Related
error_directory
Name
deny_info
Synopsis
This directive allows you to show specific error messages to users when a request matches certain ACL elements. This is more informative than sending a generic "access denied" error message, as happens by default.
When Squid checks its access control rules to see whether or not a particular request is allowed or denied, it remembers the ACL element that causes the search to terminate. You can use these ACL element names in a deny_info line to correlate error messages with a specific request characteristic. Consider, for example, this configuration:
acl Unsafe_Ports 7 9 19 22 23 25 53 109 110 119
...
http_access deny Unsafe_Ports
...
deny_info ERR_PORT_IS_UNSAFE Unsafe_Ports
When a user makes a request to an origin server on one of the ports listed in the Unsafe_Ports ACL, Squid denies the request. Furthermore, Squid generates an error message from the ERR_PORT_IS_UNSAFE file, found in the error_directory directory.
Alternatively, you can specify a URI instead of an error message template. In this case, Squid sends an HTTP 302 (Moved Temporarily) redirect to the given URI.
Finally, if you specify TCP_RESET as the error message template, Squid closes the client's connection in a way that generates a TCP reset.
Syntax
deny_info error-page-name|URI
acl-name
Default
No default
Example
deny_info ERR_PORT_IS_UNSAFE Unsafe_Ports
Related
error_directory, acl
Name
memory_pools
Synopsis
Squid's memory pools are an attempt to optimize the way Squid allocates and frees memory. Certain data structures inside Squid are pooled. This means that rather than freeing unused memory, Squid holds onto it for future use. It also means that a particular chunk of memory is normally used for the same type of data structure. Memory pools may improve Squid's performance by avoiding frequent calls to malloc( ) and free( ). The downside, however, is that the overall memory usage may be higher. If memory is a precious resource on your system, you might want to disable memory pools.
Syntax
memory_pools on|off
Default
memory_pools on
Example
memory_pools off
Related
cache_mem, memory_pools_limit
Name
memory_pools_limit
Synopsis
This directive specifies an upper limit on the amount of unused memory to hold onto. If the total size of all unused, pooled memory exceeds this value, Squid begins returning unused memory to the malloc library by calling free( ).
If set to 0 (the default), Squid doesn't place any limit on the amount of unused memory to keep