Blogging Roller
While rollerweblogger.org is down, I'll be blogging here



Subscribe to "Blogging Roller" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.
 

 

Tuesday, June 25, 2002
 
Roller load testing and Tomcat vs. Resin

CQHost accused Roller of "generating an exception/crash the JVM" and maybe they are right.  After all, ever since they shut me down around noon today, I don't think they have crashed once.  I told them that I am very interested in helping to find and fix this problem, but I have not heard back from them.  I assume they are just tired of dealing with me.  As you know I feel the same way about them.

I found it pretty hard to believe that Roller is the source of the CQHost crashes so I decided to test Roller under heavy load and see if I can make it crash or lock up my JVM.  I have a configuration at home that is very similar to the one at CQHost: Redhat 7.1 Linux, Sun JDK 1.4, and MySQL.  I downloaded JMeter and ran some tests with Roller running on Resin 2.1.1 and Roller running on Tomcat 4.0.4.

Hardware / Software Configuration
CPU: AMD Athlon 1600 (1.4ghz)
Memory: 296mb
OS: RedHat Linux 7.2
JVM: Sun Java 1.4.0
Database: MySQL
Other software: Struts, Velocity, Castor JDO

JMeter test plan:
Number of threads: 2
Loop count: 1000
Ramp-up time: 0

Test A: Roller on Resin 2.1.1 with the MM.MySQL JDBC driver and MM.MySQL connection pooling - no page caching.  Page load time averaged 2.8 seconds, there were no JVM crashes or lockups.

Test B: Roller on Tomcat 4.0.4 with MM.MySQL JDBC driver and DBCP connection pooling - no page caching. Page load time averaged 6.2 seconds, there were no JVM crashes or lockups.

What did I learn?  I learned that Roller I cannot make Roller crash or lockup a JVM under moderately heavy load - much greater load than I have ever gotten at CQHost.  I also learned that Resin is about twice as fast as Tomcat when rendering the very same Roller weblog page.

11:19:36 PM    
Local Blog

Jeremy Rayner has written a very nice and simple little Java-based client-side blogger called (for the moment) LocalBlog.  LocalBlog provides a simple little Swing-based interface for editing blog entries, generates both HTML and RSS for your blog, and uses FTP to copy your blog to the web server of your choice.  By using the tiny little JDBC-ready HSQL database to store blog entries and the ORO NetComponents FTP library, he has avoided writing a lot of code. I like that.  LocalBlog does not do page templates, blog calendars, and blogrolls yet, but it is a very nice start.

10:19:15 PM    
Tomcat vs. Resin: DataSource Setup

One limitation of Tomcat 4.0.X is JNDI DataSource setup.  With Tomcat 4.0.X you cannot use the javax.sql.ConnectionPoolDatasource implementation that came with your JDBC driver.  Instead you have to download the latest Jakarta Commons DBCP, Pool, and Collections jars (pre-release software) and use DBCP to do the pooling.  If you want to do this take a look at this email from the Tomcat-User mailing-list for some pointers.

With Resin, you can use the javax.sql.ConnectionPoolDatasource implementation that came with your JDBC driver. For example, I configured the MM.MySQL JDBC driver's connection pooling by adding the following (non-standard) stuff to Roller's web.xml deployment descriptor file:

<resource-ref>
  <res-ref-name>jdbc/rollerdb</res-ref-name>
  <res-type>javax.sql.ConnectionPoolDataSource</res-type>
  <init-param driver-name=
  "org.gjt.mm.mysql.jdbc2.optional.MysqlConnectionPoolDataSource"/>
  <init-param serverName="localhost"/>
  <init-param user="myUserName"/>
  <init-param password="myPassword"/>
  <init-param port="3306"/>
  <init-param databaseName="roller" />
</resource-ref>

If you don't like adding non-standard stuff to your web.xml, you can add the same stuff to your resin.conf file.

I don't know if this will be fixed in Tomcat 4.1 or not.

8:50:35 PM    

OK.  I pounded the Roller/Resin/WinXP combo for about an hour using JMeter, using 3 threads and a 1 second ramp-up time.  Roller ran flawlessly and Resin did not crash. 

5:43:23 PM    
It's not me, it's you
CQHost now says that Roller is crashing the JVM.  I told them that, if this is true, I am very interested in finding and fixing the problem.  I've been hammering Roller/Resin/WinXP with JMeter to see if I can make it crash.  I'll try Roller/Resin/Linux next. 1:08:31 PM    

CQHost is down again. I guess that JDK 1.4 upgrade didn't help. 9:54:47 AM    

CQHost is back now. They were down all day Sunday and they were down for over and hour three separate times yesterday.  During outage number three, I submitted this text in my trouble ticket:

Restart the server please. You need to figure out why the server is constantly crashing and fix it. If you are not willing to do this then you need to refund my money, this is getting ridiculous

They responded that they have now upgraded to JDK 1.4 and expect things to be stable for a while. If things are not stable, then they will move me to a stable server.  As they say in Missouri - show me.

I've got some emails out to some of the hosting services mentioned in the JavaLobby thread.  Also, I also have some responses to the questions I sent to the Resin mailing list.  I'll review this stuff in a post later on today.

7:02:17 AM    



Click here to visit the Radio UserLand website. © Copyright 2002 David M Johnson.
Last update: 8/20/2002; 12:06:29 AM.
This theme is based on the SoundWaves (blue) Manila theme.
June 2002
Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            
May   Jul


What is this webpage?

This is my old weblog. I only blog here when my real weblog Blogging Roller is experiencing technical difficulties.