Constantly running out of swap space
Olivier Nicole
Olivier.Nicole at cs.ait.ac.th
Fri Sep 18 03:21:42 UTC 2015
Bernard Higonnet <bthcom at higonnet.net> writes:
> Using FreeBSD 10.2
>
> I'm using a swap file set up as described at
> https://www.freebsd.org/doc/handbook/adding-swap-space.html
>
> No matter what size I make it (last time 4GB) I run out of swap space on
> a VPS with 768KB RAM. Space is being used by amavisd/clamd which is
> apparently notorious space hungry, but it's clear to me there's a
> problem somewhere. Everything works OK for a while (a few hours? on a
> system with very little traffic (100 emails a day...)) and then runs out
> of space.
I am running amavisd/clamd on a machine, I gave it 4GB RAM and it still
swap from time to time.
Amavis, one master, two children, each are almost 500MB
clamd, almost 500MB
See:
last pid: 70640; load averages: 0.16, 0.16, 0.17 up 8+16:01:29 10:19:16
89 processes: 1 running, 88 sleeping
CPU: 0.0% user, 0.0% nice, 1.5% system, 0.0% interrupt, 98.5% idle
Mem: 838M Active, 2148M Inact, 640M Wired, 68M Cache, 409M Buf, 248M Free
Swap: 8192M Total, 119M Used, 8073M Free, 1% Inuse
PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
68717 kluser 1 35 0 469M 298M lockf 2 0:46 0.00% perl
68444 kluser 1 20 0 469M 297M select 0 0:52 0.00% perl
759 kluser 2 20 0 443M 319M select 0 12:12 0.00% clamd
64665 kluser 1 20 0 435M 269M select 3 0:34 0.00% perl
643 root 1 20 0 270M 1112K select 0 0:03 0.00% rpc.statd
70386 root 1 20 0 249M 239M select 0 0:14 0.00% avs
953 root 1 20 0 247M 238M select 0 80:33 0.00% avs
662 root 1 20 0 105M 4444K select 1 6:57 0.00% vmtoolsd
741 postgrey 1 20 0 103M 9884K select 1 1:00 0.00% perl
70471 on 1 25 0 99900K 8324K select 2 0:00 0.00% sshd
70468 root 1 22 0 99900K 8256K select 3 0:00 0.00% sshd
The 3 first perl processes are amavis.
In your case, you could try to configure asmavis to not spawn any child
(is it even possible), for 100 mails per day, it is plenty enough. But
even that and clamd, you are already above 1GB.
By the way, you write 768KB of RAM, do you mean 768MB?
Bests,
Olivier
> I assume amavisd/clamd are not using swap space explicitly and the OS
> decides on is own that swap space is needed.
>
> Any suggestions?
>
> TIA
> Bernard Higonnet
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>
--
More information about the freebsd-questions
mailing list