[ejabberd] How about memory consumption?!

Max Loparyev max at city.veganet.ru
Sun Oct 10 19:54:58 MSD 2004


In few words it is a disaster!
	I have an old good machine with 128M Ram, Pentium 166MMX processor, 
serving jabber about 2 years for our home network with about 50 online 
users in average and 100 online at maximum. We have about 1300 accounts 
in xdb_file storage and its size about 41M. Now i am running wpjabberd 
for main server, one else for conference and another one wpjabberd with 
JIT service, consuming 46M(16M), 29M(1.8M), and 64M(22M) respectively(i 
mentioned Virtual size(Resident size)).

	Ejabberd is future reach and aggresively developed server, so i think 
to give it a try. After clean start without any users I've got the next 
parameters 28M VSIZE and 17m RSS, which is acceptable, but when I 
convert my spool to ejabberds mnesia storage is starts to eat 
106MB(95M)(here and after VSIZE(RSS)). At this time it is already not so 
good, because I need some memory for JIT service, but still acceptable 
without thinking of growing a user database in the future. I've tuned DB 
to not store roster in RAM and it helpes - memory consumption returns to 
its previous values i.e ~30M(17M)

But what really stops me, it is the backup process. Here is a clean facts.
I've captured a log by the next command:
top -b -d 1 -p 12636 | awk 'BEGIN{i=3} {if (i % 5==0)print $0;i++}' > 
top.backup

12636 max       16   0 32324  18m 6664 S  0.0  3.6   1:19.90 beam 

12636 max       16   0 32324  18m 6664 S  0.0  3.6   1:19.90 beam 

12636 max       15   0 34336  19m 6664 D 73.9  3.8   1:20.64 beam 

12636 max       16   0 34336  19m 6664 D 79.9  3.8   1:21.44 beam 

12636 max       16   0 34336  19m 6664 D 79.9  3.8   1:22.24 beam 

12636 max       16   0 34336  19m 6664 D 82.9  3.8   1:23.07 beam 

12636 max       16   0 34336  19m 6664 D 82.8  3.8   1:23.90 beam 

12636 max       16   0 34336  19m 6664 R 78.9  3.8   1:24.69 beam 

12636 max       15   0 34336  19m 6664 D 82.0  3.8   1:25.51 beam 

12636 max       16   0 33568  18m 6664 D 81.0  3.8   1:26.32 beam 

12636 max       16   0 34336  19m 6664 D 83.0  3.8   1:27.15 beam 

12636 max       16   0 55628  35m 6664 R 77.2  7.0   1:27.93 beam 

12636 max       16   0 95444  46m 6664 R 86.3  9.3   1:28.80 beam 

12636 max       16   0  120m  65m 6664 R 84.8 13.1   1:29.65 beam 

12636 max       16   0 96800  70m 6664 D 85.0 14.0   1:30.50 beam 

12636 max       16   0  109m  83m 6664 R 81.8 16.6   1:31.32 beam 

12636 max       16   0  130m  96m 6664 D 89.0 19.1   1:32.21 beam 

12636 max       16   0  134m 117m 6664 R 78.6 23.3   1:33.00 beam 

12636 max       16   0 68308  48m 6664 D 89.0  9.7   1:33.89 beam 

12636 max       16   0 74936  55m 6664 R 72.3 11.0   1:34.62 beam 

12636 max       15   0 91728  72m 6664 D 63.0 14.5   1:35.25 beam 

12636 max       16   0  156m  96m 6664 R 75.9 19.1   1:36.01 beam 

12636 max       16   0  168m 142m 6664 D 78.0 28.2   1:36.79 beam 

12636 max       15   0  199m 168m 6664 D 64.9 33.4   1:37.44 beam 

12636 max       16   0  193m 147m 6664 R 53.9 29.2   1:37.98 beam 

12636 max       17   0  198m 148m 6664 R 99.9 29.5   1:38.98 beam 

12636 max       18   0  200m 152m 6664 R 99.0 30.3   1:39.97 beam 

12636 max       20   0  198m 152m 6664 R 93.0 30.2   1:40.90 beam 

12636 max       19   0  155m 112m 6664 R 87.0 22.4   1:41.77 beam 

12636 max       16   0  143m 101m 6664 R 72.4 20.1   1:42.50 beam 

12636 max       16   0  158m 112m 6664 R 74.6 22.3   1:43.25 beam 

12636 max       16   0  128m 112m 6664 R 87.2 22.4   1:44.13 beam 

12636 max       17   0  131m 115m 6664 R 99.9 22.9   1:45.14 beam 

12636 max       16   0 88820  72m 6664 S 17.0 14.5   1:45.31 beam 

12636 max       16   0 88820  72m 6664 S  0.0 14.5   1:45.31 beam 

12636 max       16   0 88820  72m 6664 S  0.0 14.5   1:45.31 beam

it returns to normal 30M(17M) after some time because I use 
ERL_FULL_SWEEP=0 when starting erl. The resulting data file is 57M in 
size. So for backup 57M of data i need 199M(168M) of memory. This is 
really confusing for me and i am scared by volumes of RAM that i would 
need to support 1M accounts if i will want to do that.

-- 
Saionara, Max.
xmpp://mcsim@city.veganet.ru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.jabber.ru/pipermail/ejabberd/attachments/20041010/aa59b1b2/signature.bin


More information about the ejabberd mailing list