[Koha-bugs] [Bug 7879] New: Memoize::Memcached two times slower than it should be
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Apr 2 23:15:16 CEST 2012
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7879
Priority: P5 - low
Change sponsored?: ---
Bug ID: 7879
Assignee: gmcharlt at gmail.com
Summary: Memoize::Memcached two times slower than it should be
QA Contact: koha.sekjal at gmail.com
Severity: enhancement
Classification: Unclassified
OS: All
Reporter: dpavlin at rot13.org
Hardware: All
Status: NEW
Version: rel_3_6
Component: Architecture, internals, and plumbing
Product: Koha
Created attachment 8791
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8791&action=edit
Memoize::Memcached 2x speedup
While profiling Koha with memcached turned on I was stunned by NYTProf results:
Calls P F Exclus Inclus Subroutine
55 2 1 1.70s 1.70s Memoize::Memcached::EXISTS
55 2 1 1.68s 1.68s Memoize::Memcached::FETCH
Code analysts showed that it generates two FETCH requests for each item.
Attached patch fixes upstream module and might be beneficial on existing Koha
installations which use memcached.
It uses shared variable, and it's safe in CGI installations.
Having shared variable showed another characteristic of current code:
55 2 1 33.8ms 33.8ms Memoize::Memcached::EXISTS
55 2 1 362µs 362µs Memoize::Memcached::FETCH
This is good, but a little bit too fast. Examining hit and miss ratio stored in
Koha::Persistant::stats it turns out that we are accessing memcache 106 times,
but only 4 times for new values.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list