>тама дефолт разве не оптимальный?
есть смысл почитать handbook, документацию чтобы понять что сие есть:
0xFFFFFFFF +-----------------------+-----
| |
| KERNEL | (1G)
| |
0xC0000000 +-----------------------+-----
| |
| USER STACK |
| | |
| V |
| |
+-----------------------+
| |
| |
| AVAILABLE FOR MMAP |
| | (stack, mmap, user data,program) = 3G
MAXDSIZ +-----------------------+
| |
| USER DATA (NON-MMAP)|
| |
+-----------------------+
| |
| PROGRAM BINARY |
| |
0x00000000 +-----------------------+-----
Any C program which uses shared libraries uses mmap(). Many library
functions and libraries also use mmap(), including portions of our
malloc() implementation (though the main area used by mmap is the
user data area). If you increase MAXDSIZ to the point where there
is not enough VM for the mmap()'s programs make then you will run
into the problems you are having.
I'm not sure why you are trying to have squid use all 4G of the
machine directly in its user data area. Squid caches a lot of
things in memory, sure, but it also caches things in files and
FreeBSD will use free physical memory to cache those files
regardless of how you configure the machine. So you should be
getting good utilization of your 4G of memory even if Squid cannot
use all 4G in its user data area directly. Setting MAXDSIZ to
2.9GB out of the 3G of user VM available puts a huge squeeze on
how much the program can mmap() before it runs out of VM.
-Matt
Matthew Dillon
<dillon@backplane.com>