Saturday, 14 December 2013

oh what fun is porting

Amidst the chaos of testing for performance, I almost forgot to talk about cross-compatibility. Till now, we discussed about epoll instead of select, but this applies only to Linux systems. Epoll wouldn't work on Mac! We needed to ensure platform independence at least to an extent.

Hence, we went forward with implementing kqueue so as to be compatible with the FreeBSD environment. And a rush of conditional directives! We had to make changes in the Makefile too, so as to enable conditional compilation. This was again done for ensuring cross platform working of boa.

epoll and kqueue are similar in many respects. To start with, both are event based and have a control mechanism to add/delete modify file descriptors and events.
Kqueue is much more abstracted and hence general.

After implementing kqueue, we were wondering about the performance comparison between epoll and kqueue. But, it was not exactly the right thing to do since we had different system configurations on our laptops. Performance comparisons are only valid when all the other parameters remain same.
Theoretically, kqueue would do better. In the paper given link to below, more on performance has been discussed.

While going through the implementation of boa, we came across this in a comment "oh what fun is porting" and we agree too!!

Few useful links:
  Paper : Comparing and Evaluating Mechanisms : Page 217
  Select, Epoll, Kqueue

No comments:

Post a Comment