Online Book Reader

Home Category

Squid_ The Definitive Guide - Duane Wessels [17]

By Root 2051 0
and some are unique to Squid. Here are the standard options that you might find useful:

--prefix=PREFIX

This sets the installation prefix directory, as described earlier. The installation prefix is the default directory for all executables, logs, and configuration files. Throughout this book, $prefix refers to your choice for the installation prefix.

--localstatedir=DIR

This option allows you to change the location for the var directory. The default is $prefix/var, but you might want to change it so that Squid's disk cache and log files are stored elsewhere.

--sysconfdir=DIR

This option allows you to change the location for the etc directory. The default is $prefix/etc. If you like to use /usr as the installation prefix, you might want to set —sysconfdir to /etc.

Here are the Squid-specific ./configure options:

--enable-dlmalloc[=LIB]

On some systems, the built-in memory allocation (malloc) functions have poor performance characteristics when used with Squid. Using the —enable-dlmalloc option builds and links with the dlmalloc package included in the Squid source code. If you already have dlmalloc built on your system, you can specify the library's pathname as the =LIB argument. See http://g.oswego.edu/dl/html/malloc.html for more information on dlmalloc.

--enable-gnuregex

Squid uses regular expressions for pattern matching in access control lists and other configuration directives. The GNU regular expression library comes with the Squid source code; it can be used on operating systems that don't have built-in regular expression functions. The ./configure script probes your system for a regular expression library and enables the use of GNU regex if necessary. If, for some reason, you want to force the usage of GNU regex, you can add this option to the ./configure command.

--enable-carp

The Cache Array Routing Protocol (CARP) is useful for forwarding cache misses to an array, or cluster, of parent caches. There's more about CARP in Section 10.9.

--enable-async-io[=N_THREADS]

Async I/O refers to one of Squid's techniques for improved storage performance. The aufs storage module uses a number of thread processes to perform disk I/O operations. This code works only on Linux and Solaris systems. The =N_THREADS argument changes the number of thread processes Squid uses. aufs and Async I/O are discussed in Section 8.4.

Note that the —enable-async-io option is a shortcut that turns on three other ./configure options. It is equivalent to specifying:

--with-aufs-threads=N_THREADS

--with-pthreads

--enable-storeio=ufs,aufs

--with-pthreads

The —with-pthreads option causes the compilation procedure to link with your system's Pthreads library. The aufs storage module is the only part of Squid that uses threads. Normally, you don't specify this option on the ./configure command line because it's enabled automatically when you use —enable-async-io.

--enable-storeio=LIST

Squid supports a number of different storage modules. With this option, you tell ./configure which modules to compile. The ufs, aufs, diskd, coss, and null modules are supported in Squid-2.5. You can also get a list by looking at the directories under src/fs.

LIST is a comma-separated list of module names. For example:

% ./configure --enable-storeio=afus,diskd,ufs

The ufs module is the default and least likely to cause problems. Unfortunately, it also has limited performance characteristics. The other modules may not necessarily compile on your particular operating system. For a complete description of Squid's storage modules, see Chapter 8.

--with-aufs-threads=N_THREADS

Specifies the number of threads to use for the aufs storage scheme (see Section 8.4). By default, Squid automatically calculates how many threads to use, based on the number of cache directories.

--enable-heap-replacement

This option has been deprecated but remains for backward compatibility. You should always use the —enable-removal-policies option instead.

--enable-removal-policies=LIST

Removal policies are the algorithms Squid uses to eject

Return Main Page Previous Page Next Page

®Online Book Reader