From: Chris M. <ch...@de...> - 2003-09-04 03:55:10
|
Hi, We've some rough benchmarks. For a stacked 29 bar chart: Here is the Jcharts 0.74 result. The times are in milliseconds $ java org/jCharts/demo/simpleServlet/TestGenerate elapsed Time = 2952 elapsed Time = 816 elapsed Time = 799 elapsed Time = 717 elapsed Time = 792 and JfreeCharts results: $ java org/jfree/chart/demo/TestGenerateFree elapsed Time = 3860 elapsed Time = 1730 elapsed Time = 1539 elapsed Time = 1607 elapsed Time = 1556 The tests were done on a laptop with Gnome and OpenOffice, emacs and a heap of things running. It was running standard i686 RH 2.4.20-18.7 Linux kernel on a single CPU 1GHz machine. The tests were done with JDK1.4 (JfreeCharts needed it to generate the charts... some libraries). We also found that the size of the chart had a major influence on the performance. So that was one reason (amongst others) that we choose jCharts. Subsequent to that we have done stability tests against the 1.0 development version with some of our modifications to the source. (shortly to be put back into the dev tree). Our favourite chart is a combo stacked 3D bar chart with 2 data sets and 2 line charts and left and right Y axis, of about 13 data points a piece. We've got a few other pieces in the equation so the jCharts engine is being fed by a servlet that is passed the data and chart parameters over http. I ran Apache Bench against it so it was a servlet on one machine talking to a servlet gening a chart to disk and returning a unique file name on the charting machine. We got these figures: Machine 1 - my overworked DB server (bless it): OS: Linux version 2.4.18-19.7.x CPU: Intel Pentium III (Katmai) 450 MHz processor (891.11 BogoMIPS) Memory: 382424k/393216k available Software: jCharts 1.0+ with SUN JVM 1.4.1_01, Tomcat 4.1.12, also a whole bunch of stuff, 2 x Oracle instances, iPlanet LDAP server, Apache 192 processes: 190 sleeping, 2 running, 0 zombie, 0 stopped CPU states: 0.5% user, 0.3% system, 0.0% nice, 0.3% idle Mem: 384884K av, 376868K used, 8016K free, 0K shrd, 43016K buff Swap: 1052248K av, 133632K used, 918616K free 181448K cached C:\Program Files\Apache Group\Apache2\bin>ab -n 10 -c 1 http://webserver.defacto.local:8081/Charts/Test This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.1 $> apache-2.0 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/ Benchmarking dbserver.defacto.local (be patient).....done Server Software: Apache Server Hostname: webserver.defacto.local Server Port: 8081 Document Path: /Charts/Test Document Length: 65 bytes Concurrency Level: 1 Time taken for tests: 11.953125 seconds Complete requests: 10 Failed requests: 0 Write errors: 0 Total transferred: 1870 bytes HTML transferred: 650 bytes Requests per second: 0.84 [#/sec] (mean) Time per request: 1195.313 [ms] (mean) Time per request: 1195.313 [ms] (mean, across all concurrent requests) Transfer rate: 0.08 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 0 Processing: 1078 1194 220.1 1109 1796 Waiting: 1078 1194 220.1 1109 1796 Total: 1078 1194 220.1 1109 1796 So it clanked away at a little under a chart a second. I banged up the concurrent threads to 10 C:\Program Files\Apache Group\Apache2\bin>ab -n 100 -c 10 http://webserver.defacto.local:8081/Charts/Test This is ApacheBench, Version 2.0.40-dev <$Revision: 1.121.2.1 $> apache-2.0 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/ Benchmarking dbserver.defacto.local (be patient).....done Server Software: Apache Server Hostname: webserver.defacto.local Server Port: 8081 Document Path: /Charts/Test Document Length: 65 bytes Concurrency Level: 10 Time taken for tests: 115.31250 seconds Complete requests: 100 Failed requests: 11 (Connect: 0, Length: 11, Exceptions: 0) Write errors: 0 Total transferred: 18689 bytes HTML transferred: 6489 bytes Requests per second: 0.87 [#/sec] (mean) Time per request: 11503.125 [ms] (mean) Time per request: 1150.313 [ms] (mean, across all concurrent requests) Transfer rate: 0.16 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.0 0 0 Processing: 4093 11313 2792.3 11109 17312 Waiting: 4093 11313 2792.2 11109 17312 Total: 4093 11313 2792.3 11109 17312 Percentage of the requests served within a certain time (ms) 50% 11109 66% 11796 75% 13546 80% 14015 90% 15171 95% 16078 98% 16625 99% 17312 100% 17312 (longest request) C:\Program Files\Apache Group\Apache2\bin> Length errors are due to filename sometimes having differing sizes And it still churned out about 1 chart a second. I did the same test on the production server: OS: Windows 2000 Advanced Server CPU: 2 x Pentium Xeon 1.2Ghz processor Memory: 4Gb Software: jCharts 1.0+ with SUN JVM 1.4.1_01, Tomcat 4.1.24, ActiveDirectory, not much else [root@DBServer bin]# ab -n 100 -c 10 http://dbserver.defacto.local:8081/Charts/Test This is ApacheBench, Version 1.3d <$Revision: 1.67 $> apache-1.3 Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/ Benchmarking dbserver.defacto.local (be patient).....done Server Software: Apache Server Hostname: dbserver.defacto.local Server Port: 8081 Document Path: /Charts/Test Document Length: 65 bytes Concurrency Level: 10 Time taken for tests: 14.040 seconds Complete requests: 100 Failed requests: 38 (Connect: 0, Length: 38, Exceptions: 0) Broken pipe errors: 0 Total transferred: 18662 bytes HTML transferred: 6462 bytes Requests per second: 7.12 [#/sec] (mean) Time per request: 1404.00 [ms] (mean) Time per request: 140.40 [ms] (mean, across all concurrent requests) Transfer rate: 1.33 [Kbytes/sec] received Connnection Times (ms) min mean[+/-sd] median max Connect: 0 7 22.5 0 100 Processing: 456 1338 434.0 1288 2568 Waiting: 456 1337 434.1 1288 2568 Total: 456 1345 435.6 1288 2568 Percentage of the requests served within a certain time (ms) 50% 1288 66% 1506 75% 1660 80% 1753 90% 1894 95% 2059 98% 2406 99% 2545 100% 2568 (last request) I get the feeling that pure chart creation is down to CPU and JVM implementation, scalability probabably is memory and servlet engine. Probably a bit of Tomcat tuning on the production machine wouldn't have gone amiss. Chris To: jch...@li... From: dea...@ve... Date: Wed, 3 Sep 2003 15:11:28 -0700 Subject: [jCharts-users] jchart speed and scalability Reply-To: jch...@li... hi folks, I just got the jCharts0.7.4 up and running using jboss3.2.1 on both linux and solaris boxes (JDK1.4.1_02) using the supplied example WAR package. I am rather new to using java servlets let alone jcharts, but I would like to know if there are any benchmarks out there on how fast these charts are generated. For example, let's say we only want to generate a line chart (X,Y) with 95 data points using servlets instead of jsp. Now, excluding any startup-time delays due to the java servlet engine, how fast could the graph be rendered (e.g in comparison to perl/GD and/or Jfreechart)? Now, how about scalability, let's just say same question except many more users accessing different graphs at the same time. In a multi-processor environment, is scalability mostly dependent on the java servlet engine? Also, same question but without using servlets or jsp or any java application server at all? I know benchmarks are very difficult to do, but I'm just looking for a rough estimate. I'm going to run some of my own testing and benchmarks soon also. Thank you. -dean |