Hi, On Tue, Jul 02, 2013 at 10:11:05AM +0200, Christian Recktenwald wrote: > On Mon, Jul 01, 2013 at 08:40:04PM +0200, Christoph Pleger wrote: > > Hello, > > > > We are running squid in a vserver, but this does not work very reliably, > > because the squid process crashes quite often. It seems that this happens > > every time when squid is using more than 256 MB of cache memory - the > > limit is set to a very high value in squid.conf, 24 GB. > > > > Do vservers have a memory limit for processes so that a process that needs > > more is killed? > > first shot: take a look at ulimits (vserver root user > is not allowed to raise them) and see Actually memory is not limited usually. Filedescriptors are, and not by the util-vserver, but by pam. Indeed you can not raise them and pam lowers them when you log in. We have mysql servers using 34G of ram, and everything is vserver-ed. We do set limits but those are container group limits. Christoph: your problem might be that you have turned on transparent hugetable support. Transparent hugetables and memory container groups are a continuous cause for OOM's. Make sure you have that turned off. Anyway: have something like this in your configuration: ard@pidsley:/etc/vservers/avserver$ grep . cgroup/* cflags cgroup/cpuset.cpus:0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 cgroup/memory.limit_in_bytes:44G cgroup/memory.memsw.limit_in_bytes:45G cflags:VIRT_MEM cflags:VIRT_CPU cflags:VIRT_LOAD the cflags are important so the vserver knows what its limits are. ard@pidsley:/sys/kernel/mm/transparent_hugepage$ cat enabled [always] madvise never This should read never, unless you are really really sure you have only one vserver with one process that uses a lot of memory. We used squid in a lot of places, but that has been replaced by varnish. Squid is now only used as an outbound proxy. If it's necessary I would put a varnish in front of squid, squid has a good persistent cache, but it's slow compared to varnish. Varnish doesn't have any persistence, but is amazingly fast. Put a haproxy in front of it for url based hashing and you have yourself a high performance cache cluster.