Tuesday 24th September 2013: 1.14am. So Google Summer of Code 2013 ended today! Boost.AFIO is more or less peer review ready - some additional unit tests to be added mainly to get the code coverage back up, otherwise it's done. Paul will still need some time to finish his directory monitoring feature, but that is fairly orthogonal to the existing code base and its lack of presence doesn't disturb anything.
Performance tuning AFIO was interesting - I have a giant recursive mutex around the ops code because I didn't have a guaranteed concurrent_unordered_map<> to hand, and therefore I kept the design very simple. Performance isn't great, it can push 150k chained ops/sec which is enough for a SSD, but which sure is awful compared to Google's or Microsoft's engines, but hey mine propagates exceptions and theirs does not. Unchained ops of course are far faster (about 550k ops/sec), and it's mainly ASIO, the STL and of course especially malloc limiting performance there so there isn't much I can do about those. The single biggest performance throttle on chained ops is the aforementioned giant recursive mutex, about 60% of CPU time goes on spinning on that mutex during handling completion of each op, so you can see why it's nearly a quarter of the speed (in case it looks like the sums don't add up, this is because the remaining CPU time goes on sleep waits rather than spin waits).
AFIO v2, if I do such a thing, would of course use a far more complex design which doesn't suffer from the above throughput problems. But, for now, as AFIO v1 is good enough for consumer SSDs, and more importantly it has linear scaling throughout so it won't slow down with additional load. Good enough for my next project, an embedded ACID compliant graph database called TripleGit!
#gsoc2013 #boostcpp #cpp11 #boostafio
Go to previous entry | Go to next entry | Go back to the archive index | Go back to the latest entries |