Hello Ram,
Thank you very much for your reply.
I've noticed from the excellent GC Easy report that our GC is running well. The issue is that sometimes, when we re-compile and re-deploy some Struts tomcat applications, we get (this is just an example of a small app):
----------------------------------------
compile: [javac] Compiling 50 source files to /chroots/tomcat70/apps/sd/WEB-INF/classes Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000772700000, 66060288, 0) failed; error='Cannot allocate memory' (errno=12) # # There is insufficient memory for the Java Runtime Environment to continue. # Native memory allocation (mmap) failed to map 66060288 bytes for committing reserved memory. # An error report file with more information is saved as: # /nfs/home/s/silviu/workspace/sd/hs_err_pid6855.log
----------------------------------------
Due to limited budget of the university, we have relatively modest hardware. We run this tomcat on a virtual server with 2 CPUs and 16GB of memory allocated from the physical server.
When we got the error above, the "top" showed:
---------------------------------------
top - 18:55:54 up 14 days, 11:37, 2 users, load average: 0.03, 0.04, 0.05 Tasks: 123 total, 1 running, 122 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.2 us, 0.5 sy, 0.0 ni, 99.2 id, 0.0 wa, 0.0 hi, 0.0 si, 0.2 st KiB Mem : 16266332 total, 286648 free, 12823072 used, 3156612 buff/cache KiB Swap: 2097148 total, 2074876 free, 22272 used. 3104424 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1187 tomcat70 20 0 17.2g 11.6g 8888 S 0.7 75.0 357:51.28 jsvc
with 75% of the memory (~ 13GB as out of 16GB 3GB used for buff/cash) used by the tomcat process. There was only
286648kb free left.
The only solution was to restart tomcat: we want to avoid that as we have a couple of apps on that tomcat container.
For the apps on this tomcat server we do not have many concurrent users. It is for academic/university use.
As a solution, I asked for more memory on the virtual server where tomcat runs and also for a configuration of 2 load balancing cluster tomcats(we have such a set up running well on some other server).
That is why I asked if we should increase the heap size.
Thank you very much for any help with this issue.
Silviu
Edit your Comment