Foros de discusión

tuning tomcat 5.5 for liferay 4.3 with 1000 concurrent users

Toch d Ninja, modificado hace 15 años.

tuning tomcat 5.5 for liferay 4.3 with 1000 concurrent users

Regular Member Mensajes: 105 Fecha de incorporación: 30/10/06 Mensajes recientes
Hi,

I am trying to deploy liferay 4.3 on a linux Core 2 duo server, 3gb ram and mysql db. How do i tune tomcat so as to enable concurrent login of about 1000 registered users on my portal without having an "out of memory error".

1) i have already set java heap memory to btw 512mb to 1.6gb, but the portal starts very slowly and then i get an out of memory error.

2) why is linux memory usage showing 98% memory even when i restart the server and no user is using my portal.
this is very urgent.

cheers!
Toch.
Matherine Jenkins, modificado hace 15 años.

RE: tuning tomcat 5.5 for liferay 4.3 with 1000 concurrent users

New Member Mensaje: 1 Fecha de incorporación: 22/10/08 Mensajes recientes
When do you use eclipse ???
Toch d Ninja, modificado hace 15 años.

RE: tuning tomcat 5.5 for liferay 4.3 with 1000 concurrent users

Regular Member Mensajes: 105 Fecha de incorporación: 30/10/06 Mensajes recientes
Hi,

I am still waiting for a liferay expert to respond to this post.

This is a very serious and urgent case.

regards,
Toch.
thumbnail
James Min, modificado hace 15 años.

RE: tuning tomcat 5.5 for liferay 4.3 with 1000 concurrent users

Expert Mensajes: 293 Fecha de incorporación: 14/08/06 Mensajes recientes
For every set up there will be different settings and hardware involved, so you need to use tools to figure out where your bottle necks are and what the threshhold is for concurrent users.

Start with a load generator like JMeter or Loadrunner, and see how many you can load until it starts to slow down. Then you need to identify what the bottleneck is. There are plenty of Java profilers out there..... YourKit, JProfiler.... use something to figure out what you need to change vs. blindly increasing memory. After you have identified, then tweak accordingly. You may need to increase memory setting for the JVM, or you may need to configure a cluster to handle all the extra load. Or you may need to have better physical hardware.

The point is, it is almost impossible to give you a specific configuration to run on without some iterative analysis.

All that being said, I would start thinking about configuring a load balancer and tomcat cluster.
thumbnail
James Min, modificado hace 15 años.

RE: tuning tomcat 5.5 for liferay 4.3 with 1000 concurrent users

Expert Mensajes: 293 Fecha de incorporación: 14/08/06 Mensajes recientes
Also moving your database server to a separate machine might be a good idiea. 1GB more memory couldn't hurt either.
thumbnail
James Min, modificado hace 15 años.

RE: tuning tomcat 5.5 for liferay 4.3 with 1000 concurrent users

Expert Mensajes: 293 Fecha de incorporación: 14/08/06 Mensajes recientes
Also I posted a blog a while back regarding Java profiling:

http://www.liferay.com/web/jmin/blog/-/blogs/931577?_33_redirect=%2Fweb%2Fjmin%2Fblog
thumbnail
Paul Hussein, modificado hace 15 años.

RE: tuning tomcat 5.5 for liferay 4.3 with 1000 concurrent users

Junior Member Mensajes: 63 Fecha de incorporación: 31/05/06 Mensajes recientes
Toch d Ninja:
Hi,

I am trying to deploy liferay 4.3 on a linux Core 2 duo server, 3gb ram and mysql db. How do i tune tomcat so as to enable concurrent login of about 1000 registered users on my portal without having an "out of memory error".

1) i have already set java heap memory to btw 512mb to 1.6gb, but the portal starts very slowly and then i get an out of memory error.

2) why is linux memory usage showing 98% memory even when i restart the server and no user is using my portal.
this is very urgent.

cheers!
Toch.



Toch,

Could you give some more info about your environment. What O/S are you running ?.

The strategy you should adopt is to use the o/s tools and others to see where your problem lies.

If you are on a linux box, then the first thing you should do is run-up top.

This will give you an overview of your system. You can see

1. Swap, is there any defined, and how much is being used.
2. Liferay Java process, how much memory is reserved, resident and the CPU usage.
3. Mysql, how much memory is reserved, resident and the CPU usage.


Pull out the network cable and start the portal server with no network connection to ensure no-one is accessing the portal when you start it.

The 98% memory usage may not be real. Watch out for some tools reporting total memory usage including cache, and not just resident apps.

Tomcat as far as I am aware used one thread per request. So 1000 concurrent users = 1000 threads. This will soon eat your memory if the apps it runs are heavy.

This is an interesting article

http://weblogs.java.net/blog/jfarcand/archive/2006/03/can_a_grizzly_r.html


Post back with some more info