[Koha-bugs] [Bug 11998] Syspref caching issues
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Mar 9 13:43:36 CET 2016
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11998
--- Comment #128 from Jacek Ablewicz <abl at biblos.pk.edu.pl> ---
(In reply to Jacek Ablewicz from comment #126)
> 3) with patch & default caching system (Cache::Memory): 98 ms + 70 ms spent
> in ->get_from_cache()
+ 10 ms spent in ->set_in_cache() - sorry, forgot to include that statement run
time
Conclusion: Cache::Memory is not very efficient when used to store a lot of
simple variables - probably because:
- it's pure perl (?)
- we currently serialize/deserialize all data types (including scalars) with
freeze()/thaw() when using Cache::Memory
Memcache is better (up to 2x on average) for simple variables - it's XS, and it
serializes only complex data structures, but there is (more or less constant)
40usec penalty involved due to network latency/turnaround.
Both chache systems are quite terrible for caching big, complex data structures
(one MARC framework: 900 kilobytes; Cache::Memory is a bit faster then memcache
in this case), mostly because they need to deserialize those structures each
time when the data is fetched. We can try to use better serializer (Sereal
etc.) - it may help speed up things for memcache (MARC framework storage size
will go down to 300-100KB), but there is virtually nothing we can do to improve
deserialization time. Instead, one can avoid doing the same expensive operation
50x times per script run, i.e. by implementing cache with 2+ levels (1st level
being a simple hash or CHI::Driver::RawMemory for example, and 2nd level -
memcache etc.)
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list