Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-dev] Performance branch

Here are some early results from the jetty performance branch that
I've been working on. The main aim of that branch has been to update
some of the optimisations in jetty with the latest thinking.

For example, jetty has an optimisation that recognises that most
request headers on the same connection are near identical. Thus most
of the header fields are kept from request to request and effort is
saved in parsing and generating strings etc.    But the down side with
this is that connections live a lot longer than requests and thus more
object move to survivor space and then onto old generation, eventually
resulting in worse GCs.      Thus it may be better to make a little
bit more per request garbage to avoid filling old gen.

The results below look promising.   The request rate and CPU levels
are much the same (but the test was not stressing the machine), but
latencies are halved and garbage is greatly reduced.

Some aspects of this branch are moderately radical - so it is not
ready for prime time yet, but the intention is to make this become
part of 7.5


I've used cometd as the benchmark:


Master branch:

========================================
Statistics Started at Wed Jul 13 15:47:03 EST 2011
Operative System: Linux 2.6.38-8-generic amd64
JVM : Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM runtime
1.5.0_22-b03 1.5.0_22-b03
Processors: 8
System Memory: 93.42611% used of 7.7474327 GiB
Used Heap Size: 63.799248 MiB
Max Heap Size: 910.25 MiB
Young Generation Heap Size: 227.5625 MiB
- - - - - - - - - - - - - - - - - - - -
Testing 1000 clients in 100 rooms
Sending 10000 batches of 10x50 bytes messages every 10000 µs
- - - - - - - - - - - - - - - - - - - -
Statistics Ended at Wed Jul 13 15:48:50 EST 2011
Elapsed time: 107259 ms
	Time in JIT compilation: 24 ms
	Time in Young Generation GC: 2191 ms (74 collections)
	Time in Old Generation GC: 549 ms (2 collections)
Garbage Generated in Young Generation: 19213.312 MiB
Garbage Generated in Survivor Generation: 62.21875 MiB
Garbage Generated in Old Generation: 172.48682 MiB
Average CPU Load: 276.23654/800
----------------------------------------

Outgoing: Elapsed = 107258 ms | Rate = 932 messages/s - 93 requests/s
All messages arrived 998290/998290
Messages - Success/Expected = 998290/998290
Incoming - Elapsed = 107250 ms | Rate = 9307 messages/s - 8971
responses/s (96.39%)
Messages - Wall Latency Distribution Curve (X axis: Frequency, Y axis: Latency):
                   @  _  20 ms (97929, 9.81%)
@                     _  40 ms (1047, 0.10%)
@                     _  60 ms (117, 0.01%)
@                     _  79 ms (21, 0.00%)
@                     _  99 ms (9, 0.00%)
@                     _  119 ms (31, 0.00%)
@                     _  138 ms (9, 0.00%)
@                     _  158 ms (2, 0.00%)
@                     _  178 ms (0, 0.00%)
@                     _  197 ms (0, 0.00%)
@                     _  217 ms (0, 0.00%)
@                     _  237 ms (5, 0.00%)
@                     _  256 ms (0, 0.00%)
@                     _  276 ms (0, 0.00%)
@                     _  296 ms (0, 0.00%)
@                     _  315 ms (0, 0.00%)
@                     _  335 ms (0, 0.00%)
@                     _  355 ms (0, 0.00%)
@                     _  374 ms (0, 0.00%)
@                     _  394 ms (5, 0.00%)
Thread Pool Queue (max_queued | avg_latency/max_latency): 303 | 0/390 ms
Messages - Wall Latency Min/Ave/Max = 1/0/394 ms
Messages - Network Latency Min/Ave/Max = 0/0/394 ms
-----





performance branch:


========================================
Statistics Started at Wed Jul 13 16:22:58 EST 2011
Operative System: Linux 2.6.38-8-generic amd64
JVM : Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM runtime
1.5.0_22-b03 1.5.0_22-b03
Processors: 8
System Memory: 98.42294% used of 7.7474327 GiB
Used Heap Size: 142.62637 MiB
Max Heap Size: 910.25 MiB
Young Generation Heap Size: 227.5625 MiB
- - - - - - - - - - - - - - - - - - - -
Testing 1000 clients in 100 rooms
Sending 10000 batches of 10x50 bytes messages every 10000 µs
- - - - - - - - - - - - - - - - - - - -
Statistics Ended at Wed Jul 13 16:24:44 EST 2011
Elapsed time: 105982 ms
	Time in JIT compilation: 29 ms
	Time in Young Generation GC: 1597 ms (64 collections)
	Time in Old Generation GC: 0 ms (0 collections)
Garbage Generated in Young Generation: 17934.424 MiB
Garbage Generated in Survivor Generation: 11.3125 MiB
Garbage Generated in Old Generation: 140.87505 MiB
Average CPU Load: 275.76367/800
----------------------------------------

Outgoing: Elapsed = 105981 ms | Rate = 943 messages/s - 94 requests/s
All messages arrived 999775/999775
Messages - Success/Expected = 999775/999775
Incoming - Elapsed = 105977 ms | Rate = 9433 messages/s - 9069
responses/s (96.14%)
Messages - Wall Latency Distribution Curve (X axis: Frequency, Y axis: Latency):
                   @  _  10 ms (95462, 9.55%)
@                     _  19 ms (1707, 0.17%)
@                     _  29 ms (643, 0.06%)
@                     _  38 ms (606, 0.06%)
@                     _  48 ms (405, 0.04%)
@                     _  57 ms (107, 0.01%)
@                     _  67 ms (40, 0.00%)
@                     _  76 ms (22, 0.00%)
@                     _  85 ms (1, 0.00%)
@                     _  95 ms (10, 0.00%)
@                     _  104 ms (14, 0.00%)
@                     _  114 ms (2, 0.00%)
@                     _  123 ms (4, 0.00%)
@                     _  133 ms (7, 0.00%)
@                     _  142 ms (17, 0.00%)
@                     _  151 ms (4, 0.00%)
@                     _  161 ms (7, 0.00%)
@                     _  170 ms (8, 0.00%)
@                     _  180 ms (4, 0.00%)
@                     _  189 ms (3, 0.00%)
Thread Pool Queue (max_queued | avg_latency/max_latency): 401 | 0/408 ms
Messages - Wall Latency Min/Ave/Max = 1/0/189 ms
Messages - Network Latency Min/Ave/Max = 0/0/185 ms
-----


Back to the top