[squid-users] kswapd0 and memory usage

Vieri rentorbuy at yahoo.com
Mon Mar 29 15:00:57 UTC 2021


Hi,

I've been running squid & c-icap for years, and only recently have I had a severe system slowdown.

My kswapd0 process was at a constant 100% CPU usage level until I forced restarting of both squid and c-icap.

I've been using several Squid versions over the years, but the only differences I know of between my previous recent setup that worked and the current setup that has "failed" once (for now)  are:

- upgraded from 5.0.4-20201125-r5fadc09ee to Version 5.0.5-20210223-r4af19cc24

- set cgroups for both squid and c-icap services with just one setting: cpu.shares 512

- upgraded to c-icap 0.5.8

Given the stressful situation I only had time to notice that kswapd0 was at 100%, that top reported that all swap space was being used, and that the whole server was very sluggish. The additional problem is that the system is a router and uses TPROXY with squid sslbump so I don't think I can virtualize the web proxying services. Hence the use of cgroups to try to contain squid, c-icap and clamav. I have yet to define a cgroup for memory usage.

Restarting Squid and c-icap alone (not clamd) immediately solved the kswapd0 "gone wild" issue.
Mem usage went back to something like:

# free -h
              total        used        free      shared  buff/cache   available
Mem:           31Gi       9.2Gi        21Gi        48Mi       1.0Gi        21Gi
Swap:          35Gi       1.7Gi        33Gi

I only have debug_options rotate=1 ALL,1 in my squid config file, and sifting through cache.log doesn't give me any clues.

If this were to happen again (not sure when or if) what should I try to search for?

Regards,

Vieri


More information about the squid-users mailing list