0

I have built a stateless java servlet web application and the requirement is to accept at least 5000 transaction per second (with 150 concurrent thread). I am using ehcache together with SQL server 2005 to avoid writing to the slow harddisk.

In the performance test (with Jmeter 150 threads), i only manage to score roughly 2800 transactions per second (less than half of expected). When i take a sampler inside the JVisualVM, i notice that:

 org.apache.catalina.connector.requestfacade.getsession()   <-- take more than 44.7% of CPU time

Any idea what does the requestfacade.getsession() doing and is there a way to speed it up? while i must optimise my code, i still need to figure out what does the above line doing else 5000 per second is practically impossible.

Tomcat conf:

-single Tomcat instance (6.0.23) -Using Connectir executor, with 150 maxThread

Server conf:

-Windows 2008

-xeon quad core

-8GB ram

-1TB raid 5 HDD

Any help is must appreciated!

Reusable
  • 1,888
  • 7
  • 27
  • 46

2 Answers2

1

If your servlet is truly stateless, why is it accessing the session?

:-)

millhouse
  • 9,817
  • 4
  • 32
  • 40
0

If you're working this in a stateless fashion, see about configuring tomcat to not create a session by default.

Also if you are using JSP, make sure it is set to not create a session.

Dave G
  • 9,639
  • 36
  • 41
  • i am sure it is stateless because i dont get any data from session and my servlet extends from HttpServlet. However, you raise an interesting area where i need to configure tomcat to not create session. (i take for granted that tomcat will not create session if not required) – Reusable Oct 19 '11 at 10:27
  • I think what you might be seeing /may/ be default behaivor where a session is created regardless. As such, I think you can configure tomcat to not create sessions by default and they will have to be explicitly requested. – Dave G Oct 19 '11 at 15:18