>хм. загадочная фраза. :)
>а вообще то реально хоть на каком не сильно навороченном железе действительно
>поиметь заветные 4Г памяти?
читайте внимательно:
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>
# less /sys/conf/NOTES
...
#
# Certain applications can grow to be larger than the 512M limit
# that FreeBSD initially imposes. Below are some options to
# allow that limit to grow to 1GB, and can be increased further
# with changing the parameters. MAXDSIZ is the maximum that the
# limit can be set to, and the DFLDSIZ is the default value for
# the limit. MAXSSIZ is the maximum that the stack limit can be
# set to. You might want to set the default lower than the max,
# and explicitly set the maximum with a shell command for processes
# that regularly exceed the limit like INND.
#
options MAXDSIZ=(1024UL*1024*1024)
options MAXSSIZ=(128UL*1024*1024)
options DFLDSIZ=(1024UL*1024*1024)