Search squid archive

Re: Slow memory leak

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

 



On 9/26/2012 8:11 PM, tcr@xxxxxxxxxxxx wrote:
Reposting this because I posted the original via the nabble site and it didn't get mailed out to the list....


I posted a while ago about this but didn't get any replies. I run squid servers which handle heavy sustained traffic (50-100Mbps per server is not unusual). The squid processes' memory footprints all grow without bounds. I am running various different Squid versions from 2.7 to 3.2.1 on the different servers, and all versions exhibit this problem.

I have tried all the debugging steps I've been able to find- playing around with cache sizes, changing the memory directives in the conf files, etc. It just looks like a plain old leak though, because these processes will exhaust 16GB of RAM over the course of a week. When I look at the cache mgr info page, its accounting of memory usage is nowhere near the actual size shown in top.

As for my config, the servers are IPv4 only, they grant access based on a lengthy ACL of allowed IPs. This ACL comes from a text file.

If anybody has any ideas, I'd really appreciate it. If not, can someone at least tell me how to best go about debugging a leak in squid? I am ok with poking around in valgrind or whatever, but I'm hoping someone can steer me in the right direction to start.

Thank you.
-Ty

Post your squid.conf and other data that you have.
commands you have used?
You should notice that "top" shows Virt and RES which is a bit different.
my server is using about 800MB of ram and free+top shows about 1300-1400MB used due to somethings. you can try to use HTOP to see a more colorful picture that can give you another angle on the memory usage.

50-100Mbps is not how you should measure traffic (in most cases) load but more in Requests Per Second. I have one server that serves more then 100Mps but with only couple RPS which only strains some memory and cpu for the task.

you can also take a look at your squid proxy used such as proxy using:
top -u proxy
which will give you only the squid user process.
then you can calculate the VIRT RES SHR and %MEM manually to see what and how.
for example:
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 7765 proxy     20   0  215m 153m 2744 S    0  7.7   3:29.51 squid
 7768 proxy     20   0  107m  44m 2496 S    0  2.3   0:44.98 squid
 7794 proxy     20   0 30708  380  156 S    0  0.0   0:00.46 unlinkd
 8608 proxy     20   0 40600 9328 1236 S    0  0.5   0:00.90 run.rb
 8610 proxy     20   0 40932 9788 1408 S    0  0.5   0:00.92 run.rb

you see that one squid uses 7.7 % and other one 2.3(of 2GB)

Regards,
Eliezer
--
Eliezer Croitoru
https://www1.ngtech.co.il
IT consulting for Nonprofit organizations
eliezer <at> ngtech.co.il


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

  Powered by Linux