I want to limit ressource usage of spamd with ulimit, but I'm unsure about what the ulimit options mean and how they translate to the spamd situation. I think mostly of the memory limit options.
F.i. with a spamd process of about 95 MB (size 96540 RSS 94M Share 2308) using these memory limits doesn't kill spamd: max locked memory (kbytes, -l) 51200 max memory size (kbytes, -m) 51200 stack size (kbytes, -s) 51200 virtual memory (kbytes, -v) unlimited If I limit virtual memory as well it gets killed, although no swap space is used, so "virtual memory" obviously doesn't mean the swap space but the maximum address space or so? So, what do these settings mean and how do they translate to the size/RSS/share shown in top? And what happens when more than one spamd process is running? Does each of them use 95 MB of RAM (= 190 MB used), so that a limit of 100 MB for virtual memory would prevent it from spawning a second process? (Our mail servers are usually not so heavily loaded that I see more than one spamd process.) Obviously, the useful limits are different for each system and load situation, but I would be grateful if someone with insight in this area would discuss some points and advise about some reasonable limits. Most of our machines are stacked with 512 MB of RAM (not big, but good enough) and my objective is not to troubleshoot any memory issues (we don't have any) but the very rare but nevertheless sometimes happening occurence of spamd racing away and grabbing and grabbing memory until it kills the system. Setting other limits doesn't seem to be useful? cpu time (seconds, -t) unlimited - I guess limiting this for a daemon is a bad idea? open files (-n) 1024 - doesn't seem to be much of an issue? max user processes (-u) 1000 - this can be controlled with -m, anyway. Thanks for any advice. Kai