PDA

View Full Version : SM 3 Performance Issues



mal90
16-Jan-2017, 11:33
Hi,

our sm 3.0.2 server is showing some issues concering used space and used swap space.

currently our susemanager setup looks as follows:

RAM: 32 GB
SWAP: 2 GB
CPU: 16 Cores

Clients: 451

we have created a seperate LV with 15GB for /var/lib/jabberd and are monitoring it via cacti.

Currently it takes one week for the susemanger to fill this LV.

https://picload.org/image/rorlrcpc/varlibjabber.png

So i've created a cron.weekly script as an workaround in order to clean it:



#!/bin/sh
####
#### https://fedorahosted.org/spacewalk/wiki/JabberDatabase
#### Location /etc/cron.weekly/jabbercleanup.sh
#### cron by ttkoegl
####

(
echo "Used Space before CleanUp: "
/usr/bin/du -h /var/lib/jabberd/db/
echo ""
echo "Cleaning Up Jabber DB, Check if Working afterwards"
echo ""
/usr/bin/sudo -u jabber /usr/bin/db_checkpoint -1 -h /var/lib/jabberd/db/
/usr/bin/db_archive -a -h /var/lib/jabberd/db/
/usr/bin/db_archive -d -h /var/lib/jabberd/db/
systemctl restart jabberd.service
####/etc/init.d/jabberd restart
echo ""
echo "Used Space after CleanUp: "
/usr/bin/du -h /var/lib/jabberd/db/

)| mail -s "SUSE MANAGER Jabber Cleanup" -r "SUSE MANAGER <susemanager@example>" example@example.com


This cleans up the jabberdb in /var/lib/jabberd/db/ every week and generates output as follows:

Used Space before CleanUp:
15G /var/lib/jabberd/db/

Cleaning Up Jabber DB, Check if Working afterwards

/var/lib/jabberd/db/log.0000005703
/var/lib/jabberd/db/log.0000005704
/var/lib/jabberd/db/log.0000005705
...

Used Space after CleanUp:
24M /var/lib/jabberd/db/


Is there an error with my jabberd or can it be set to "less verbose" because i believe this behavior is not intended?

Also the longer my susemanager installation runs the more RAM and SWAP space it consumes. Any ideas on this issue?

https://picload.org/image/rorlrcpo/swap.png
https://picload.org/image/rorlrcpd/mem.png
(Please Note: i've increased the memory in week 45 from 20GB to 32GB

Please let me know if you've experienced similar issues or need additional Infortmation.

Thanks in advance

Malcolm

mal90
16-Jan-2017, 11:47
As a reference here are the uptime graph and the /var/lib/jabberd graph for the same period:

https://picload.org/image/rorlrwga/jabberd.png
https://picload.org/image/rorlrwgl/uptime.png

jmozdzen
18-Jan-2017, 16:42
Hi Malcolm,


Hi,

our sm 3.0.2 server is showing some issues concering used space and used swap space.

[...]
So i've created a cron.weekly script as an workaround in order to clean it:
[...]
This cleans up the jabberdb in /var/lib/jabberd/db/ every week and generates output as follows:

Used Space before CleanUp:
15G /var/lib/jabberd/db/

Cleaning Up Jabber DB, Check if Working afterwards

/var/lib/jabberd/db/log.0000005703
/var/lib/jabberd/db/log.0000005704
/var/lib/jabberd/db/log.0000005705
...

Used Space after CleanUp:
24M /var/lib/jabberd/db/


Is there an error with my jabberd or can it be set to "less verbose" because i believe this behavior is not intended?

Please note that those log files aren't "log messages" but transaction logs, needed i.e. for roll-backs or if replicating the database to some other DBMS instance. Periodically cleaning up the dbms is the right thing to do. The docs I had a look at imply that the default would be to remove unused log files automatically, this can be disabled though by (jabberd) coding. I checked one of my test servers, these log file keep accumulating there as well, so you're not alone.


Also the longer my susemanager installation runs the more RAM and SWAP space it consumes. Any ideas on this issue?

https://picload.org/image/rorlrcpo/swap.png
https://picload.org/image/rorlrcpd/mem.png
(Please Note: i've increased the memory in week 45 from 20GB to 32GB


From your stats, the machine is typically using less than 8 GB of real memory, the remainder (up to almost 32 GB) is used for caching file access ("memory cache"). Linux should free "memory cache" allocations when memory is needed for more urgent things, like running programs. Why it's swapping out pages, though, I cannot tell from here.

Regards,
J