Some more points.
I'd like to point out
that I don't think the lack of actual concurrency testing is a real problem, at
least for most single CPU installations. If most of the time is spent doing other stuff in a request (which
is most likely the case), then on average when a process goes to access the
cache, nothing else will be accessing it, so it won't have to block to wait to
get a lock. In that case, one process doing 10*N accesses is the same as N
processes doing 10 accesses, and the results are still
meaningful.
Perrin Harkins pointed out IPC::MM
which I've added to the test code. It's based on the MM library (http://www.engelschall.com/sw/mm/mm-1.1.3.tar.gz)
and includes a hash and btree tied hash implementation. I've tried the tied hash
and it performs extremely well. It seems to be limited mostly by the speed of
the Storable module.
Package C0 - In process hash
Sets per sec = 181181 Gets per sec = 138242 Mixes per sec = 128501 Package C1 - Storable freeze/thaw Sets per sec = 2856 Gets per sec = 7079 Mixes per sec = 3728 Package C2 - Cache::Mmap Sets per sec = 810 Gets per sec = 2956 Mixes per sec = 1185 Package C3 - Cache::FileCache Sets per sec = 392 Gets per sec = 813 Mixes per sec = 496 Package C4 - DBI with freeze/thaw Sets per sec = 660 Gets per sec = 1923 Mixes per sec = 885 Package C5 - DBI (use updates with dup) with freeze/thaw Sets per sec = 676 Gets per sec = 1866 Mixes per sec = 943 Package C6 - MLDBM::Sync::SDBM_File Sets per sec = 340 Gets per sec = 1425 Mixes per sec = 510 Package C7 - Cache::SharedMemoryCache Sets per sec = 31 Gets per sec = 21 Mixes per sec = 24 Package C8 - IPC::MM Sets per sec = 2267 Gets per sec = 5435 Mixes per sec = 2769 Rob
|
- Comparison of different caching schemes Rob Mueller (fastmail)
- Re: Comparison of different caching schemes Perrin Harkins
- Re: Comparison of different caching scheme... Jeremy Howard
- Re: Comparison of different caching sc... Perrin Harkins
- Re: Comparison of different caching schemes Rob Mueller (fastmail)
- Re: Comparison of different caching scheme... Perrin Harkins
- Re: Comparison of different caching scheme... Rob Mueller (fastmail)
- Re: Comparison of different caching schemes Olivier Poitrey
- Re: Comparison of different caching schemes DeWitt Clinton
- Re: Comparison of different caching scheme... Rob Mueller (fastmail)
- RE: Comparison of different caching sc... Rob Bloodgood
- Re: Comparison of different cachin... Paul Lindner
- RE: Comparison of different c... Rob Bloodgood
- Re: Comparison of different cachin... Perrin Harkins
- Re: Comparison of different c... Dave Rolsky
- Re: Comparison of differe... Jay Thorne
- Re: Comparison of dif... Perrin Harkins