[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #50 from Julian Maurice--- (In reply to Julian Maurice from comment #49) > (In reply to Jacek Ablewicz from comment #48) > > (In reply to Julian Maurice from comment #47) > > > Patches pushed to 3.22.x, will be in 3.22.8 > > > > Hi Julian, > > > > With Bug 16044 pushed for 3.22.8, some follow-ups of this report may be > > needed in 3.22.x branch too (Bug 16229, Bug 16412, Bug 16221). > > Thanks, I will push them ASAP Done -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #49 from Julian Maurice--- (In reply to Jacek Ablewicz from comment #48) > (In reply to Julian Maurice from comment #47) > > Patches pushed to 3.22.x, will be in 3.22.8 > > Hi Julian, > > With Bug 16044 pushed for 3.22.8, some follow-ups of this report may be > needed in 3.22.x branch too (Bug 16229, Bug 16412, Bug 16221). Thanks, I will push them ASAP -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #48 from Jacek Ablewicz--- (In reply to Julian Maurice from comment #47) > Patches pushed to 3.22.x, will be in 3.22.8 Hi Julian, With Bug 16044 pushed for 3.22.8, some follow-ups of this report may be needed in 3.22.x branch too (Bug 16229, Bug 16412, Bug 16221). -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jacek Ablewiczchanged: What|Removed |Added Blocks||16758 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16758 [Bug 16758] Caching issues in scripts running in daemon mode -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Julian Mauricechanged: What|Removed |Added CC||julian.maur...@biblibre.com Status|Pushed to Master|Pushed to Stable --- Comment #47 from Julian Maurice --- Patches pushed to 3.22.x, will be in 3.22.8 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Julian Mauricechanged: What|Removed |Added Blocks||16412 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16412 [Bug 16412] Cache undef in L1 only -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jonathan Druartchanged: What|Removed |Added Blocks||16229 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16229 [Bug 16229] Koha::Cache should be on the safer side -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jacek Ablewiczchanged: What|Removed |Added See Also||https://bugs.koha-community ||.org/bugzilla3/show_bug.cgi ||?id=16221 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jacek Ablewiczchanged: What|Removed |Added Blocks||16166 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16166 [Bug 16166] Improve L1 cache performance -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #46 from Brendan Gallagher--- (In reply to Katrin Fischer from comment #45) > I see 2 sign off lines - one from a QA team member. Should we move this PQA? Last patch pushed (mar 29 - 2016) -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Katrin Fischerchanged: What|Removed |Added CC||katrin.fisc...@bsz-bw.de --- Comment #45 from Katrin Fischer --- I see 2 sign off lines - one from a QA team member. Should we move this PQA? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jacek Ablewiczchanged: What|Removed |Added Attachment #49568|0 |1 is obsolete|| --- Comment #44 from Jacek Ablewicz --- Created attachment 49647 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49647=edit Bug 16044: Populate the L1 cache when L2 is fetched The whole patch set is not very pertinent if the L1 cache is not populated when L2 is fetched! This patch fixes this inconsistency. Signed-off-by: Jesse Weaver Signed-off-by: Jacek Ablewicz -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jonathan Druartchanged: What|Removed |Added See Also||https://bugs.koha-community ||.org/bugzilla3/show_bug.cgi ||?id=16041 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jesse Weaverchanged: What|Removed |Added Attachment #49555|0 |1 is obsolete|| --- Comment #43 from Jesse Weaver --- Created attachment 49568 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49568=edit Bug 16044: Populate the L1 cache when L2 is fetched The whole patch set is not very pertinent is the L1 cache is not populated when L2 is fetched! This patch fixes this inconsistency. Signed-off-by: Jesse Weaver -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #42 from Jonathan Druart--- I was going to ask Tomas or Jacek, but Jesse is around at this time :) -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #41 from Brendan Gallagher--- (In reply to Jonathan Druart from comment #40) > Created attachment 49555 [details] [review] > Bug 16044; Populate the L1 cache when L2 is fetched > > The whole patch set is not very pertinent is the L1 cache is not > populated when L2 is fetched! > This patch fixes this inconsistency. Skip QA ok? Or I can ask piano to look. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #40 from Jonathan Druart--- Created attachment 49555 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49555=edit Bug 16044; Populate the L1 cache when L2 is fetched The whole patch set is not very pertinent is the L1 cache is not populated when L2 is fetched! This patch fixes this inconsistency. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #39 from Jonathan Druart--- (In reply to Jacek Ablewicz from comment #19) > BTW, that part of the 1st followup: > > my $get_sub = $self->{ref($self->{$cache}) . "_get"}; > -return $get_sub ? $get_sub->($key) : $self->{$cache}->get($key); > +my $value = $get_sub ? $get_sub->($key) : $self->{$cache}->get($key); > + > +$L1_cache{$key} = $value; > + > +return $value; > > is essential if you want to test this bug with L2 = memcache; without it, L1 > cache is not getting populated in such setups. Which explains case 1) from > comment #17 ;) This comment was very relevant and I should have submitted a follow-up to make this patchset pertinent and useful. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Brendan Gallagherchanged: What|Removed |Added Status|Passed QA |Pushed to Master CC||bren...@bywatersolutions.co ||m --- Comment #38 from Brendan Gallagher --- Pushed to Master - Should be in the May 2016 release. Thanks! -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Tomás Cohen Arazichanged: What|Removed |Added Status|Signed Off |Passed QA --- Comment #37 from Tomás Cohen Arazi --- Looks good, works as expected. Great job guys. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Tomás Cohen Arazichanged: What|Removed |Added Attachment #49494|0 |1 is obsolete|| --- Comment #36 from Tomás Cohen Arazi --- Created attachment 49549 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49549=edit Bug 16044: Add an unsafe flag to Koha::Cache->get_from_cache If the caller/developer knows what he is doing, he can decide not to deep copy the structure. It will be faster but unsafe! If the structure is modified, the cache will also be updated. This option must be used with care and is not the default behavior. Signed-off-by: Jesse Weaver Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Tomás Cohen Arazichanged: What|Removed |Added Attachment #49492|0 |1 is obsolete|| --- Comment #34 from Tomás Cohen Arazi --- Created attachment 49547 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49547=edit Bug 16044: Add tests to make sure structures will be copied Signed-off-by: Jesse Weaver Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Tomás Cohen Arazichanged: What|Removed |Added Attachment #49493|0 |1 is obsolete|| --- Comment #35 from Tomás Cohen Arazi --- Created attachment 49548 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49548=edit Bug 16044: Add deep cloning To avoid the cache to be modified unfortunately, the default behavior of get_from_cache will be to deep copy if we are getting a structure. If the item is a scalar, it's simply returned. Signed-off-by: Jesse Weaver Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Tomás Cohen Arazichanged: What|Removed |Added Attachment #49491|0 |1 is obsolete|| --- Comment #33 from Tomás Cohen Arazi --- Created attachment 49546 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49546=edit Bug 16044: Make tests from t/Cache.t pass The timeout does not impact the L1 cache (it would be to time consuming and not really useful to do that for this cache). To simulate the real timeout, we need to flush this L1 cache when needed. It would be also done adding a disable_L1_cache method. Signed-off-by: Jesse Weaver Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Tomás Cohen Arazichanged: What|Removed |Added Attachment #49490|0 |1 is obsolete|| --- Comment #32 from Tomás Cohen Arazi --- Created attachment 49545 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49545=edit Bug 16044: Use the L1 cache for any objects set in cache Signed-off-by: Jesse Weaver Signed-off-by: Tomas Cohen Arazi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #31 from Jacek Ablewicz--- (In reply to Jonathan Druart from comment #24) > (In reply to Jacek Ablewicz from comment #17) > > 1) CGI + memcache - no measurable differences between patched/unpatched > > It certainly comes from bug 16088, don't you think? Very unlikely IMO, Bug 16088 is (mostly) plack-specific. I got no significant speed differences in 1) test above, because for L2 = memcached, two-level caching usually doesn't happen at all: the only place in the code when L1 gets ever populated is set_in_cache() subroutine. With L2 = memcached, set_in_cache() calls are (statistically) very rare - pretty much everything is fetched from L2, and L1 is left mostly unpopulated / hardly even populated, hence no performace differences. This issue got fixed in 1st followup from Jesse (now: 1st patch in separate Bug 16140). Relevant part of that patch (see comment #19), when applied on top of Bug 16044, enables two-level caching for L2 = memcached setups. If I do that, performance differences for CGI + memcached are immediately apparent ;) -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jesse Weaverchanged: What|Removed |Added Attachment #49188|0 |1 is obsolete|| --- Comment #30 from Jesse Weaver --- Created attachment 49494 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49494=edit Bug 16044: Add an unsafe flag to Koha::Cache->get_from_cache If the caller/developer knows what he is doing, he can decide not to deep copy the structure. It will be faster but unsafe! If the structure is modified, the cache will also be updated. This option must be used with care and is not the default behavior. Signed-off-by: Jesse Weaver -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jesse Weaverchanged: What|Removed |Added Attachment #49187|0 |1 is obsolete|| --- Comment #29 from Jesse Weaver --- Created attachment 49493 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49493=edit Bug 16044: Add deep cloning To avoid the cache to be modified unfortunately, the default behavior of get_from_cache will be to deep copy if we are getting a structure. If the item is a scalar, it's simply returned. Signed-off-by: Jesse Weaver -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jesse Weaverchanged: What|Removed |Added Attachment #48968|0 |1 is obsolete|| --- Comment #26 from Jesse Weaver --- Created attachment 49490 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49490=edit Bug 16044: Use the L2 cache for any objects set in cache Signed-off-by: Jesse Weaver -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jesse Weaverchanged: What|Removed |Added Attachment #49179|0 |1 is obsolete|| --- Comment #27 from Jesse Weaver --- Created attachment 49491 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49491=edit Bug 16044: Make tests from t/Cache.t pass The timeout does not impact the L1 cache (it would be to time consuming and not really useful to do that for this cache). To simulate the real timeout, we need to flush this L1 cache when needed. It would be also done adding a disable_L1_cache method. Signed-off-by: Jesse Weaver -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jesse Weaverchanged: What|Removed |Added Attachment #49186|0 |1 is obsolete|| --- Comment #28 from Jesse Weaver --- Created attachment 49492 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49492=edit Bug 16044: Add tests to make sure structures will be copied Signed-off-by: Jesse Weaver -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jesse Weaverchanged: What|Removed |Added Patch complexity|--- |Small patch Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jesse Weaverchanged: What|Removed |Added Attachment #49240|0 |1 is obsolete|| -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jesse Weaverchanged: What|Removed |Added Attachment #49239|0 |1 is obsolete|| -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jesse Weaverchanged: What|Removed |Added Blocks||16140 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16140 [Bug 16140] Only clear L1 cache when needed -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Srdjan Jankovicchanged: What|Removed |Added CC||srd...@catalyst.net.nz -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #22 from Jacek Ablewicz--- (In reply to Jacek Ablewicz from comment #21) > We'll need to send 'thawed' scalar to memcached somehow packaged (e.g. in [ s/'thawed' scalar/'frozen' scalar/ -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #19 from Jacek Ablewicz--- BTW, that part of the 1st followup: my $get_sub = $self->{ref($self->{$cache}) . "_get"}; -return $get_sub ? $get_sub->($key) : $self->{$cache}->get($key); +my $value = $get_sub ? $get_sub->($key) : $self->{$cache}->get($key); + +$L1_cache{$key} = $value; + +return $value; is essential if you want to test this bug with L2 = memcache; without it, L1 cache is not getting populated in such setups. Which explains case 1) from comment #17 ;) -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jesse Weaverchanged: What|Removed |Added CC||jwea...@bywatersolutions.co ||m --- Comment #13 from Jesse Weaver --- Two tiny nitpicks: * Why do the commit messages say L2 instead of L1? * Why is the variable named L1_cache instead of l1_cache or _l1_cache? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #12 from Jesse Weaver--- Created attachment 49240 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49240=edit Bug 16044: (followup) don't clone cache results for framework/authvals This is needed so as not to cancel out the performance gains of the L1 cache. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #14 from Jonathan Druart--- Jesse, I really like your patches and yes, it's the way to go. But I think they go too far for a first step. We will introduce a significant perfs gain without any regressions (in theory!!) if we stupidly flush the L1 cache and deep copy in any cases. Could you move your patches to another bug report? We should also propose benchmarks to know when we are doing something interesting. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #20 from Jacek Ablewicz--- Some other thoughts, after toying with these patches for a little while. 1) If we want to stay "on the safe side" by default, clone()/dclone() call needs to be introduced to the set_in_cache() sub as well 2) Looks like Cache::Memory as L2 cache is 100% waste of time and CPU cycles. If L2 = Cache::Memory, typically we'll be storing a lot of things in there - small and large, but never fetching them back 3) In that statement > - if it's a reference, return a "deep clone" of what we keep in L1 cache in > deserialized form (that should still be way faster than fetching it from the > network and deserializing it each and every time) I was completely wrong :). Cloning very complex data structures, like MARC framework hashes in Koha, is not faster in perl then deserializing them. Cloning involves a) traversing the whole structure recursively - inspecting all the nested parts of it in various ways etc. b) creating anew the copies of all those pesky hashes, hash keys, scalars etc. in perl guts Thawing the structure from serialized form is doing b), but not a), so it can be faster. And it is - for the MARC default framework: - Storable thaw() call is taking ca 10 ms - freeze(): 6 ms - dclone(): 17 ms - decode_sereal(): 9 ms - probably not worth the trouble, there are no packages in Debian for Sereal module Memcache::Fast is using Storable thaw() as desrializer by default. Feching framework from memcached is faster (12.5 ms) than cloning it with dclone. It only involves two "expensive" tasks: thaw() - 10 ms, and probably decompress (~2 ms). This may be the problem; get_from_cache() which involves dclone() will be significantly slower, and Koha::Cache as a whole will suffer severe performance loss if used in the "safe" way. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #23 from Jacek Ablewicz--- (In reply to Jacek Ablewicz from comment #21) > We'll need to send 'frozen' scalar to memcached somehow packaged (e.g. in [ > ]), to be able to distinguish if it was originally a scalar or not. And the > complex structures in L2 cache will be double-frozen. But the 2nd freeze > call (inside Memcached::Fast) should be very cheap - at that stage, this > wouldn't be a complex data structure any more. Unless I'm very much mistaken > (see comment #20 item 3) a side effect of this will be a performance gain - > after this bug, fetching MARC framework with get_from_cache() will take 10 > ms instead of 12.5 ms on average, even with Koha::Cache used entirely in the > "safe" mode. Win-win situation ;). Or just append some small flag to the end of each string we store in L2 and strip it on fetching (0: scalar, 1: structure frozen by Storable() freeze, 2: structure frozen by Sereal, 4: undef value etc. ;) - I don't think it will affect performance of caching very small values in any measurable way, and all that double-frozen madness could be scrached then. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #16 from Martin Renvoize--- +1 to the two method approach, seems the safest and most flexible way to do it :-) +1 to splitting out the frameworks followups into their own issue. +1 to building some benchmarks to prove the performance gain. Well done all, I'm super excited to see this moving forward -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #11 from Jesse Weaver--- Created attachment 49239 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49239=edit Bug 16044: (followup) only clear L1 cache when needed This is a proposed enhancement that further increases the performance gain. Search times on a small dataset with this patch (and the following) drop from 2.2 to 1.2 seconds. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #25 from Jesse Weaver--- I think that trying to protect cache users from themselves for complex structures is going to come at too high a cost of complexity or performance, based on the discussions we've been having so far... Auditing use of functions that call APIs that return large cached structures to either add clone()s as necessary or remove mutation will be more work but likely more benefit in the long run. We could look at using Hash::Util::lock_hash. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jonathan Druartchanged: What|Removed |Added Blocks|16088 | See Also||https://bugs.koha-community ||.org/bugzilla3/show_bug.cgi ||?id=16088 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16088 [Bug 16088] Excessive CGI->new() calls hurting cache performace under plack -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jacek Ablewiczchanged: What|Removed |Added See Also||https://bugs.koha-community ||.org/bugzilla3/show_bug.cgi ||?id=16088 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #15 from Jonathan Druart--- (In reply to Jesse Weaver from comment #13) > Two tiny nitpicks: > > * Why do the commit messages say L2 instead of L1? It's a typo. > * Why is the variable named L1_cache instead of l1_cache or _l1_cache? I don't care about the name of the var, we can change it. I thought L1_cache was the more appropriate -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #17 from Jacek Ablewicz--- I'm also trying to test this, but with kinda weird results so far.. Searching (medium-size dataset, 120k biblios, 300k items, 10-200-2 hits, XSLT processing enabled, testing with initial patch set - without the last 2 followups): 1) CGI + memcache - no measurable differences between patched/unpatched 2) CGI + Cache::Memory - it's ca 2x slower for the searches with 50+ hits With the 1st followup (attachment #49239), both CGI + memcache and CGI + Cache::Memory are 2x slower :( But why is that? Supposedly, it should be neutral re/ search speed (or even a bit faster on average). 2nd followup (#49240) just disables "safety measures" in the 2 most speed-sensitive places - an instant, enormous performance gain! Not very "step-by-step", though. Would it be safe enough/reasonably safe thing to do at this stage - I have no idea. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #18 from Jacek Ablewicz--- For some reason, deep copying of MARC frameworks structures with clone() is insanely slow: - clone() from the Clone module: 62 ms !!! - clone() from Clone::Fast: 21 ms - Storable dclone(): 16.9 ms - Storable thaw(freeze()): 17.0 ms - fetching framework from DB directly (caching disabled in GetMarcStructure()): 36.6 ms If I replace clone() with Storable dclone() in Koha::Cache, search speed is back to normal. Well, almost - looks like fetching the framework directly from L2 cache is still faster (12.8 ms, L2 = memcache) then getting a clone from L1 cache. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jonathan Druartchanged: What|Removed |Added Blocks||16088 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16088 [Bug 16088] Excessive CGI->new() calls hurting cache performace under plack -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jonathan Druartchanged: What|Removed |Added See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16088 | --- Comment #24 from Jonathan Druart --- (In reply to Jacek Ablewicz from comment #17) > 1) CGI + memcache - no measurable differences between patched/unpatched It certainly comes from bug 16088, don't you think? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #21 from Jacek Ablewicz--- (In reply to Jacek Ablewicz from comment #20) > This may be the problem; get_from_cache() which involves dclone() will be > significantly slower, and Koha::Cache as a whole will suffer severe > performance loss if used in the "safe" way. But I think that issue is utterly fixable, if complex structures are stored in L1 cache in two forms { frozen => .. thawed => } We'll need to send 'thawed' scalar to memcached somehow packaged (e.g. in [ ]), to be able to distinguish if it was originally a scalar or not. And the complex structures in L2 cache will be double-frozen. But the 2nd freeze call (inside Memcached::Fast) should be very cheap - at that stage, this wouldn't be a complex data structure any more. Unless I'm very much mistaken (see comment #20 item 3) a side effect of this will be a performance gain - after this bug, fetching MARC framework with get_from_cache() will take 10 ms instead of 12.5 ms on average, even with Koha::Cache used entirely in the "safe" mode. Win-win situation ;). -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #10 from Jonathan Druart--- Jacek, I completely agree with your comment, and I think the safe option (deep copy) should be the default behavior. It will avoid regression and hard-to-catch weird issues. We will be able to switch to the unsafe but faster option later in a step-by-step process. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #9 from Jonathan Druart--- Created attachment 49188 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49188=edit Bug 16044: Add an unsafe flag to Koha::Cache->get_from_cache If the caller/developer knows what he is doing, he can decide not to deep copy the structure. It will be faster but unsafe! If the structure is modified, the cache will also be updated. This option must be used with care and is not the default behavior. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #7 from Jonathan Druart--- Created attachment 49186 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49186=edit Bug 16044: Add tests to make sure structures will be copied -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #8 from Jonathan Druart--- Created attachment 49187 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49187=edit Bug 16044: Add deep cloning To avoid the cache to be modified unfortunately, the default behavior of get_from_cache will be to deep copy if we are getting a structure. If the item is a scalar, it's simply returned. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #6 from Jonathan Druart--- Created attachment 49179 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49179=edit Bug 16044: Make tests from t/Cache.t pass The timeout does not impact the L1 cache (it would be to time consuming and not really useful to do that for this cache). To simulate the real timeout, we need to flush this L1 cache when needed. It would be also done adding a disable_L1_cache method. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jacek Ablewiczchanged: What|Removed |Added Priority|P5 - low|P1 - high -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 --- Comment #5 from Jacek Ablewicz--- To clarify comment #1: I don't think it's a bad idea; on the contrary, I think it's an excellent idea! But I also think that current/initial implementation is, again, inherently dangerous. IMO it should at least have some basic safety measures built-in to be (reasonably) safe. I dunno, something simple.. e.g - let's have two variants of ->get_from_cache(): 1) get_from_cache(): - if the cached thingy in L1 cache is a scalar - just return it, no problems whatsoever - if it's a reference, return a "deep clone" of what we keep in L1 cache in deserialized form (that should still be way faster than fetching it from the network and deserializing it each and every time) 2) get_from_cache_just_gimme_a_raw_reference_I_know_what_I_am_doing() - initial/ultra-fast implementation which just returns references directly Having two variants of get_from_cache() is not very elegant at the 1st glance, but it's the fastest and simplest method I can imagine: - it's faster than (e.g.) handling some extra parameters inside one-to-rule-them-all get_from_cache() subroutine - sooner or later some scripts will be calling that sub 1+ times, and such (seemingly very small) overheads have a nasty tendency to add up - it will allow us to introduce "I know what I'm doing / I like to live dangerously" variant selectivelly and gradually - preferably, in the separate bug reports, so if something somwhere explodes due to using the ultra-fast-but-not-always-safe caching method, it will be a lot easier to fix/revert it selectivelly without killing performance of the entire caching system -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Martin Renvoizechanged: What|Removed |Added CC||martin.renvoize@ptfs-europe ||.com --- Comment #4 from Martin Renvoize --- +1 from me, I pretty much agree entirely with Tomás's comment. With great power comes great responsibility, we indeed need a good thorough testing procedure as more things get added to the caches, but this bug in itself looks good to me. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 16044] Define a L1 cache for all objects set in cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16044 Jonathan Druartchanged: What|Removed |Added Summary|Define a L2 cache for all |Define a L1 cache for all |objects set in cache|objects set in cache -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/