The Mono Generational GC (a.k.a. SGEN) has been in the works for quite some time now. Given the no-hassle way to use it these days, I decided to compare the performance of both garbage collectors.
The test itself is very simple. I used xsp listening on port 8080 and hit empty.ashx, which is an IHttpHandler that serves a 0-length web page. In both cases, Boehm and SGEN, I warmed up the server by hitting it once and then ran the following command:
ab -c 20 -n 100000 -k http://127.0.0.1:8080/1.1/handlers/empty.ashx
This will fetch 100k empty pages with 20 concurrent requests over keep-alive connections. The results at the end of each run follows:
| Boehm | SGEN | |
| Time (s) | 29.194 | 24.687 |
| Memory in use (MB, RSS) | 80 | 61 |
| Requests per second | 3425.36 | 4050.70 |
| Average CPU use (%) | 82 | 93 |
Over 600 req/s more and using 19MB less memory! Amazing! Kudos to the guys doing all the work, specially Mark.
blog comments powered by Disqus