Subject: Re: increasing a process's max data size
To: None <>
From: Ray Phillips <>
List: port-sparc
Date: 12/06/2002 12:22:31
Thanks for the responses.


>What does
>  # ulimit -a

# ulimit -a
ulimit: Command not found.

"find / -name ulimit"  gives no output.  I didn't know about limit until today:

# limit
cputime         unlimited
filesize        unlimited
datasize        65536 kbytes
stacksize       512 kbytes
coredumpsize    unlimited
memoryuse       421292 kbytes
memorylocked    140430 kbytes
maxproc         80
openfiles       64
# limit -h
cputime         unlimited
filesize        unlimited
datasize        262144 kbytes
stacksize       262144 kbytes
coredumpsize    unlimited
memoryuse       421292 kbytes
memorylocked    421292 kbytes
maxproc         532
openfiles       1772


>Is that a really very heavily loaded squid on a machine with more
>than 256MB of RAM?

It's quite busy--potentially more than 100 clients--and has 448 MB 
RAM.  I'd like squid to use most of that.  I know squid's performance 
degrades significantly if it uses virtual memory and I checked that 
as per the FAQ:

# pstat -s
Device      1K-blocks     Used    Avail Capacity  Priority
/dev/sd0b      458640        0   458640     0%    0
/dev/sd1b     1376290        0  1376290     0%    0
Total         1834930        0  1834930     0%

>you can set the default data size limit (as opposed to the
>maximum limit) in the kernel configuration as well:
>options DFLDSIZ=bytes
>(see options(4))

DFLDSIZ and MAXDSIZ aren't mentioned in 1.5.2's options(4) man page 
but they're in 1.6's.  However, I used them both in a kernel 
configuration file and built a new kernel from it with no sign of a 
problem.  I'll try it when I have a chance to reboot the SS10. 
That's much better than altering the source code as I was thinking 
might be required.

>You also have to make sure the new maximum data size is also the
>actual data size limit for the process. You can set the limits
>using "limit" or "ulimit" or "unlimit" (depending on the shell).

Do you mean even after booting from a kernel with DFLDSIZ and MAXDSIZ 
set to, say 373293056 (356 MB), processes won't be able to use that 
much automatically?  I'd prefer it if I didn't have to execute limit 
manually after a reboot to allow squid to use the full amount. 
Perhaps it could be added to the RunCache script.