Hello,
Duane Wessels writes:
> Benoit.Rossier@mcnet.ch writes:
>
> >Hi,
> >
> >We have squid 1.1.3 on a FreeBSD 2.1.5 box.
> >What is the difference between Process Size and total memory
> >accounted in cache information (see below)?
>
> The reported "Process Size" is determined from the getrusage(2)
> system call. Some systems may report it as kbytes, some as pages.
> We're probably multiplying the ru_maxrss value by getpagesize()
> when we should not be. Check your man page for getrusage(2)
> and let me know if it reports kbytes or pages.
>
> Duane W.
>
Is this problem resolved? It appears to be the same under
Linux. Process Size is used up way more than specified:
From squid.conf:
cache_mem 4
Squid Object Cache: Version 1.1.1
Start Time: Thu, 16 Jan 1997 15:19:18 GMT
Current Time: Mon, 20 Jan 1997 13:05:30 GMT
Connection information for squid:
Number of TCP connections: 2783
Number of UDP connections: 359
Connections per hour: 33.5
Cache information for squid:
Storage Swap size: 37 MB
Storage Mem size: 2608 KB
Resource usage for squid:
CPU Time: 58 seconds (34 user 24 sys)
CPU Usage: 0%
Process Size: rss 0 KB
Page faults with physical i/o: 7745
Memory usage for squid via mallinfo():
Total space in arena: 5477 KB
Ordinary blocks: 4135 KB 1122 blks
Small blocks: 0 KB 0 blks
Holding blocks: 716 KB 3 blks
Free Small blocks: 0 KB
Free Ordinary blocks: 1342 KB
Total in use: 4851 KB 89%
Total free: 1342 KB 25%
File descriptor usage for squid:
Max number of file desc available: 1024
Largest file desc currently in use: 14
Available number of file descriptors: 1009
Reserved number of file descriptors: 100
Internal Data Structures:
3566 StoreEntries
224 StoreEntries with MemObjects
224 StoreEntries with MemObject Data
223 Hot Object Cache Items
Accounted Memory Usage:
StoreEntry 3566 x 52 bytes = 181 KB
URL strings = 176 KB
IPCacheEntry 1 x 36 bytes = 0 KB
FQDNCacheEntry 0 x 56 bytes = 0 KB
Hash link 223 x 12 bytes = 2 KB
Pool MemObject structures 224 x 92 bytes = 20 KB ( 0 free)
Pool for Request structur 7 x 4400 bytes = 30 KB ( 0 free)
Pool for in-memory object 769 x 4096 bytes = 3076 KB ( 0 free)
Pool for disk I/O 0 x 8192 bytes = 0 KB ( 0 free)
NetDB Address Entries 0 x 72 bytes = 0 KB
NetDB Host Entries 0 x 8 bytes = 0 KB
ClientDB Entries 8 x 160 bytes = 1 KB
Miscellaneous = 908 KB
Total Accounted = 4396 KB
But when you look at the process size squid eats up 7.7 MB (which is
ever increasing in the long run). It never should be more than
cache_mem if I understand it correctly:
# ps -auxw | grep squid
root 419 0.0 9.3 7748 3344 ? S Jan 16 1:00 /usr/local/squid/bin/squid
This is what the Linux getrusage(2) man page says:
getrusage returns the current resource usages, for a who
of either RUSAGE_SELF or RUSAGE_CHILDREN.
struct rusage
{
struct timeval ru_utime; /* user time used */
struct timeval ru_stime; /* system time used */
long ru_maxrss; /* maximum resident set size */
long ru_ixrss; /* integral shared memory size */
long ru_idrss; /* integral unshared data size */
long ru_isrss; /* integral unshared stack size */
long ru_minflt; /* page reclaims */
long ru_majflt; /* page faults */
long ru_nswap; /* swaps */
long ru_inblock; /* block input operations */
long ru_oublock; /* block output operations */
long ru_msgsnd; /* messages sent */
long ru_msgrcv; /* messages received */
long ru_nsignals; /* signals received */
long ru_nvcsw; /* voluntary context switches */
long ru_nivcsw; /* involuntary context switches */
};
Regards,
Dirk
-- Dirk Lutzebäck \ Email: <lutzeb@wadk-berlin.de> Werkstatt für Architektur \ Tel: (030) 611287-23 Sekr -0 Design + Kommunikation \ Fax: (030) 611287-99 Görlitzer Straße 52, D-10997 Berlin \ WWW: http://www.wadk-berlin.deReceived on Mon Jan 20 1997 - 05:31:53 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:34:07 MST