Showing posts with label Benchmark. Show all posts
Showing posts with label Benchmark. Show all posts

Monday, January 5, 2009

Computers have life? Hard-disk reacts badly to screaming

When J.C Bose first proved that plants have life, he used a crescograph and showed that pleasant music or a friendly chat with plants helped them grow faster. On the other hand, plants didn't like someone shouting on them... Now, as weird as it sounds, computers (hard-disks) also don't like it when someone shouts at them.

This was experimentally verified by Brendan Gregg from Sun Microsystems Fishworks lab where they create loud noises around a JBOD disk array. Due to the vocal vibrations, there is a spike in the I/O operations and a clear increase in the disk latency. The finding is interesting because it can be useful to make datacenters quieter to improve performance. The finding was put on Youtube on 31st Dec, 2008 and you can look at the video below:

So with that video you realize that computers don't like someone screaming at them. Next-time when Windows hangs on you, don't shout, your PC will slow-down further!! May be it has some form of life ;-)

Thursday, July 3, 2008

Solaris & Xeon Break Million Messages Per Second

Sun Microsystems today announced that it has collaborated with Intel to not only provide the best throughput performance to date by breaking the million-messages-per second barrier, but also the lowest available network latency on a 1Gb Ethernet. This performance output was generated on a new financial services benchmark known as Reuters Market Data System 6.0.3 (RMDS).

The Intel-based Sun Fire™ X4150 with Solaris 10 provided the top-notch results for the benchmark and it indeed is superlative performance to reach million-messages per second. And more importantly its done on standard network topology instead of stacked topology, which can improve scalability but comes at a cost. Doing it with standard 1Gb Ethernet is surely an achievement. The performance by the system is highly dependent on the hardware which Intel has engineered and Sun has built. But Solaris also has contributed to the improved performance. Solaris has the least latency in message passing and network performance on it is excellent.

Sun Microsystems CEO, Jonathan Schwartz applauded the new benchmark results and attributed much of it to Solaris. And he sure must be happy!! Sun Microsystems is very focused on Solaris/OpenSolaris these days with a lot of development work towards OpenSolaris. There is also a big PR machine running for openSolaris these days and some ol’ Netbeans guys have been moved to talk and explore the world on openSolaris. Sun Microsystems has got this target to make openSolaris big on the desktop with a distro-plan similar to Linux distros.

Congratulations to Sun on the new benchmark record!! It is definitely one of the strong forte for Sun to perform on the network, but the desktop move is a totally different ball-game. And why didn’t we have one of those largest hardware/microprocessor team from Sun make the system from UltraSPARC to perform that good instead of the Intel hardware ??

Monday, June 23, 2008

Niagara 3 Does 256-threads, But No Supercomputing ?

The Register claims to have learnt that the next version of Niagara processors from Sun Microsystems is going to be a 16-core and 16-thread/core processor. Sun-logo This means that the Niagara 3 will be doing 256 threads simultaneously. And we aren’t talking of some distant future plan, but Sun Microsystems will be releasing these processors in 2009.

If you did not know, Sun Microsystems has been selling the Niagara 2 processors which can run 64 threads simultaneously on 8-core processor. Niagara 2 is officially sold as UltraSPARC T2+ chips and has been the most successful processors from Sun’s lineup in recent years. Obviously with so many threads running simultaneously on a single chip means that the performance is screaming and is excellent value for money. There are 2 socket systems available as well as 4-socket systems with UltraSPARC T2+. Then there is also the Rock processors coming in 2009.

From what I heard 2 years back, UltraSPARC had the largest processor design team in the world. So it comes as no surprise that it has the best design and performance in multithreaded systems. They also open-sourced their older SPARC designs as part of OpenSPARC.net and have pledged to continue opensourcing the next-gen processors as well!!

But the sad thing is that UltraSPARC Tx processors haven’t been as big a hit in the HPC and supercomputer market. If you have a look at the list of top supercomputers for June 2008, you will realize that Sun Microsystems just figures once on the top 10. It features in the top 10 for Texas Advanced Computing Center at University of Texas and uses AMD’s Opteron processors and not UltraSPARC. In all of the 500 supercomputers, IBM rules the roost with 209 systems and HP comes second with 183 systems. IBM has been able to push POWER processors to build some awesome supercomputers whereas HP has taken Xeon and built powerful systems around it. Sun Microsystems on the other hand has just 4 supercomputer systems and all are with Opterons.

Most people would argue that single core performance proves to be more effective than multi-threaded performance in conventional supercomputer software and benchmarks. Processes are more common units of work than threads itself, but that’s where the overall system building plays its part. Like Seymour Cray has stated, “Anyone can build a fast CPU. The trick is to build a fast system.”

Monday, June 16, 2008

Improving Java Web Performance With C/C++

From the very first day that I had been working on OpenMRS, I felt that OpenMRS ran a little slower than I expected. Probably the old OpenMRS demo server openmrs_logo adds to the slowness. Later, when we were discussing about how Hibernate sessions should be implemented in OpenMRS and Java Web Apps in general, I was again brought to think about OpenMRS performance.

Since OpenMRS community generally implements on Tomcat, my main aim was to improve performance of the servlet container. One simple way to improve performance, which I had heard of earlier was the use of Apache has the “Apache Portable Runtime” (APR) project with Native Libraries. The APR uses native libraries with JNI to improve the server performance on a specific platform. In short, Tomcat is given some local OS steroids and currently works on Windows and POSIX-based systems.

The APR library is somewhat an irony for 2 main reasons:

  • I’ve heard this argument that Tomcat runs faster than Apache in some benchmarks. These guys argue that Java is faster than C/C++ and hence Tomcat wins.
  • On the other hand, APR and Native Tomcat uses JNI code written in C/C++ to improve performance.

Either ways, I think generalizing the above statements isn’t correct and hence I went forward to see if APR does improve performance of our web application. I used Windows Vista and Tomcat 6.0.16 for the test and Windows is probably what most OpenMRS implementations use. You can download the native binaries for Windows from here & APR from here.  Add the extracted files to Path and place the tcnative-1.dll in APR’s bin folder.

And the first thing I observed tomcat started little faster and even OpenMRS initialized slightly faster.

 
Before
After
OpenMRS initialization 192ms 183ms
Tomcat Server Startup 12892ms 11449ms

But startup improvement is not all. We want to check how good the application is performing and Apache Benchmark (ab) is a good way to test static content, but isn’t very good at dynamic content... I wanted to use Faban after I remembered Scott Oak’s writeup from last year, but couldn’t find enough time for the testing with Faban...

Instead, I used JMeter which is a nice generalized test that replicates how a user interacts with the web application. You can send POST requests with parameters and also simulate your test plan, just like a normal web user would use your application. Here are some of the results on different OpenMRS pages with 10 concurrent requests and average of 3 runs on my dual core server:

 
Without APR
With APR
OpenMRS homepage 225.7ms/request 185.7ms/request
User Login 1464.2ms/request 1185.3ms/request
Find patient 95ms/request 80ms/request
Patient dashboard 2887.6ms/request 1984.3ms/request

My first observation was that the first run on the test completely sucks. The later runs improve performance drastically. This is because of tomcat 6 has good caching mechanism and was shown with or without APR. Another thing I observed was that beyond 500 concurrent users the application was crying and tomcat was hanging up. APR or no APR didn’t matter much... I’ve yet to analyze why it wouldn’t scale any further, but must be something related to Hibernate sessions. May be some experienced developer can look into these figures, perform some more specific benchmarks and improve scalability.