Zbr's days.

About :: TODO :: Blog :: RSS :: Old blog :: Projects :: GIT :: Gallery :: Notes

Mon, 20 Nov 2006

New kevent release.


It will be 'take25', but I have not released it yet, since it is in testing mode right now.
This release will include:

  • new (old) ring buffer implementation with head and tail in userspace buffer with two syscalls to wait and to commit events (the latter becomes just an index update).
  • additional feature of the ring buffer - overflow counter to prevent situation when two threads are going to free the same events, but one of them was scheduled away for too long, so ring indexes were wrapped, so when that thread will be awakened, it will free not those events, which it suppose to free.
  • wake-all-threads flag - when it is set all interested threads will be awakened, otherwise only first one.
  • initalization syscall and removed /dev dependency.
  • small three-line verse (I think I created not bad step for non-english speaking person) about on-line optimisation. Casted by Shakespeare.

I wil probably include there userspace notifications.

Did I say that httperf is unfair benchmark?
It definitely is, and actually all existing kevent results are unfair. So...
Apache ab benchmarks shows kevent win, but I do not know how fair it is and how it works at all.
It is also possible, that my epoll based server is broken too.

So, let's state for now, that my benchmarks can not show kevent superiority in socket tests.
PIPE/socket test, created by Eric Dumazet proves kevent works better that epoll.
Johann Borck's tests show that kevent slightly outperforms epoll in web benchamrks.
But not mine.

So I have not gone to climbing zone (and I'm dirty as pig after weekend hinged ceiling setup) and started lighttpd patch to create real-world benchmark.

Here we go.
I've patched lighttpd with kevent support (although it is limited, since lighttpd does not support edge-triggered notifications and immediate events).
Server runs on Xeon 2.4 Ghz with 1 GB of ram and e100 NIC.
Client uses apache ab benchmark, which was started with following parameters:
  ab -n50000 -c5000 http://192.168.4.78/
i.e. 50k requests with 5k concurrent requests. Document size is 699 bytes to not make bandwidth a limiting factor.

Here are the results:
lighttpd_kevent:  4902.17 req/sec
lighttpd_epoll :  4843.71 req/sec
With 6k concurrent requests rates dropped down to:
lighttpd_kevent:   4307.18 req/sec
lighttpd_epoll :   4027.34 req/sec
although it can be just a file/socket rollup.
So essentially kevent socket code behaves like epoll in real-world benchmarks, as long as allows a lot of other interesting features.

/devel/kevent :: Link / Comments ()


New district and shops.


I live in a new district which is only became to be inhabited.
There is a bus station near the buildings and generally there are a lot of people there and obviously it is a good place for small shop or stall which would have cigaretts, beer and other such stuff.

And what would you think is the first shop opened there?
It is flavour shop!
I love my country.

/life :: Link / Comments ()