It seems to require a lot more RAM than I'd expect. Can anyone tell me what's normally expected for RAM usage. The configuration is
Servoy64 with -Xmx3g -Xms1g -XX:MaxPermSize=256m
Servoy32 with -Xmx512m -Xms512m -XX:MaxPermSize=256m
Terracotta with default settings -Xms512m -Xmx512m
MySQL, standard install.
some monitors which use almost nothing, eg jstatd
With 8GB of RAM it would run out of memory and crash from time to time. This seems odd, as we only allocate 4Gb for Servoy and TC.
Increasing the RAM to 12GB stopped the crashes, but I find that even with light webclient load (5-10 WCs) the RAM used slowly goes up to around 10-11GB, seen in this graph, even though the servoy-admin page reports Heap memory used to be low. The first part of the graph shows typical usage. I restarted the cluster around 7am on Sunday, then it slowly came back up to similar levels. On a busy day this would peak very quickly.
You can see that it uses 8-10GB of RAM, with 2-5GB of cache and very little free RAM. In the servoy admin panel, reported heap memory usually shows plenty of free RAM e.g.
System Information
Heap memory: allocated=1004928K, used=349316K, max=2796224K
None Heap memory: allocated=99520K, used=81911K, max=311296K
htop snippet just after a restart shows Servoy taking most of the RAM
- Code: Select all
PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command
25676 servoy 20 0 5123M 2489M 17148 S 116. 20.7 11:24.35 /bin/sh /home/servoy/terracotta/platform/bin/dso-java.sh -Dtc.config=
22501 servoy 20 0 2857M 2464M 5168 S 72.0 20.5 11h26:03 /usr/lib/jvm/ia32-java-6-sun/jre/bin/java -Xbootclasspath/p:/home/ser
22474 servoy 20 0 1277M 671M 5556 S 46.0 5.6 13h01:18 /usr/lib/jvm/java-6-sun/jre/bin/java -server -XX:MaxDirectMemorySize=
1599 mysql 20 0 327M 84012 4184 S 7.0 0.7 25h12:30 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql
1418 servoy 20 0 3301M 32932 5560 S 0.0 0.3 17:55.79 /usr/bin/jstatd -p 8082 -J-Djava.security.policy=/home/servoy/jstatd/
4425 servoy 20 0 24968 7780 1560 S 0.0 0.1 0:00.31 -bash
What things should I be looking at to improve memory management?