Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Techniques to improve transaction rate

Lighttpd, nginx and others use a range of techniques to provide maximum application performance such as AIO, sendfile, MMIO, caching and epoll and lock free data structures.

My collegue and I have written a little application server which uses many of these techniques and can also server static files. So we tested it with apache bench and compared ours with lighttpd and nginx and have at least matched the performance for static content for files from 100 bytes to 1K.

However, when we compare the transaction rate over the same static files to that of G-WAN, G-WAN is miles ahead.

I know this question may be a little subjective but what techniques apart from the obvious ones I've mentioned might Pierre Gauthier be using in GWAN that would enable him to achieve such astounding performance?

like image 421
hookenz Avatar asked Sep 16 '12 22:09

hookenz


1 Answers

Following G-WAN server for years, I have read the (many) talks covering this question on the old G-WAN forum.

From what I can remember, what was repeatedly addressed were the program:

  1. architecture (specific comparisons were made with nginx, lighty and cherokee)
  2. implementation (how overall branching, request parsing and response building were made)
  3. lean common path (the path followed by all types of requests: dynamic, static, handlers)

Pierre often mentionned other servers to explain what in their specific architecture and implementation was slowing them down.

As time goes, since G-WAN seems to stack more and more features (C# scripts support, a reverse-proxy and a load balancer are expected with the next version), it seems that those 3 points above are more and more important.

This is probably why each new release of G-WAN seems to be willing to be faster than the previous: the more work you do, the more extra fat must be eliminated because its cost gets higher. And like for a race car or a plane this is an incremental process, one calling for more of the other.

If you are looking for the 'secret' of G-WAN's speed then I guess that here is the key point. But if you want more details then you should rather talk directly to the G-WAN author.

like image 168
Karl Avatar answered Sep 21 '22 13:09

Karl