Search squid archive

squid 64bit memory usage, again!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We got a server w/ 8GB of RAM for caching lots of small objects in reverse proxy mode.

I calculated that 32bit squid uses about 115 bytes per object, 64bit squid uses 165 bytes.

Here's how I calculated it:

squid mem usage = cat /proc/<squid pid>/stat|awk '{print $23}'
objects in cache = snmpwalk -v 2c -c public server:3401 .1.3.6.1.4.1.3495.1.3.1.7

cost per object = (mem use) / (obj in cache)

------
w/ 64 squid, I would allocate 7.5GB of RAM to squid, 512 MB to OS. (7.5GB / 165 bytes) = 48,806,446 objects

w/ 32bit squid, I'll run 2 instances of squid, each squid have access to 3.5GB of memory. 1GB of memory will be allocated for OS, overhead, etc

2 * (3.5GB /115 bytes) = 65,358,198 objects.

------
conclusion: w/ large amount of memory, it's better to run multiple instances of squid if you want to maximize the number of objects you can store. In my configuration, I can store 25% more objects. Obviously, this setup would be a little more complex to maintain.

If anyone know of a better way to maximize the amount of objects squid can store or have any comments, please let me know.

mike


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux