Are the database and the tomcat server on the same machine?

Can you explain a little more about your synchronized code? I have
done several really big web apps with iBATIS, and haven't needed to
sync anything...

Larry


On 6/1/07, Stéphane Hanser <[EMAIL PROTECTED]> wrote:
You are right about synchronized blocks. I removed every synchronized
instruction for tests purposes and it "unleashed the cpu" ;)

It may be a problem with memory too. By disabling the cache of iBatis I
noticed an overloading of the CPU, which is understandable considering the
circumstance.

However, removing some synchronized blocks will cause concurrent access
issues when a user "mass clicks". Is it possible to configure tomcat to
queue one's requests instead of executing the in parallel ?

Thanks,

Stéphane H.

PS: thanks for the jmeter tip ;)


-----Message d'origine-----
De: David Delbecq [mailto:[EMAIL PROTECTED]
Envoyé: vendredi 1 juin 2007 10:59
À: Tomcat Users List
Objet: Re: WebApp really slow, Where do I start looking?

Considering CPU usage, it is not
1) a java memory problem, if java memory was full, garbage collector
would start using lots of cpu
2) a time consuming java code.

It might be one of following
1) synchronized blocks in your code, that would prevent 2 simultaneoous
users from doing some operations.
2) use of SingleThreadModel, which has same effect as above
3) Network congestion, you server simply can't send the response to
client due to a too small network pipe (80 requests / second resulting
each in an about 20k response need a bandwidth of more than 12Mbits)
4) A too small physical memory on system. Eg you configure tomcat to use
1G memory but your server has only 512M available, resulting in memory
pagination (swap) and sleeping of java process during pagination process
(typically, on unix server, you will see a high % of CPU dedicated to
system instead of idle when this happen)


One way to test your server performance during heavy is to use apache
jmeter.


En l'instant précis du 01/06/07 10:48, Stéphane Hanser s'exprimait en
ces termes:
> Hello,
>
> I've been working on my project for months now, it is my first WebApp
> project. Yesterday, I deployed the project on my dedicated server and
> a soon as I reached about 80 users, the webapp became really slow.
> However, the cpu usage of the server was very low (never more than
> 15-20%). I have no idea of what is the cause of this slowness (server
> config, bad programming..).
>
> Can someone help me to diagnostic the problem? Where shoul I start
> looking?
>
> thanks in advance,
>
> Stéphane H.
>
>
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to