java - How to Optimize JVM to utilize less resources -


i using apache tomcat 7.02 server.i created application using sphinx4 , deployed on apache tomcat server.since sphinx4 application requires lot of memory execute.so purpose alloted lot of memory java heap space(export catalina_opts="-xms1536m -xmx1536m"). server on have deployed server 64bit system debian lenny on it,along 2gb of ram. created servlet,post data it,get results... when run 10 users takes 8 minutes process if run 100 users simultaneously,thn shows on tomcat status

free memory: 37.0 mb total memory: 1484.81 mb max memory: 1484.81 mb

i tried using system.gc(),but did no gud.so there way through can check memory status of jvm , free when needed?

you need determine resources being using. suggest use memory profiler , change program consume less memory.

if using 64-bit jvm can use -xx:+usecompressedoops reduce memory consumption (it uses 32-bit references instead of 64-bit references)

edit: if cannot tune application may worth considering upgrading server. 24 gb server can cost around £1,800 , might allow scale 1000 users without code change. ;)


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -