Hi all,I am writing to request a poll / opinion on whether we should introduce a new cache on patch-sets by id.
We are experiencing high volumes of SQL queries on patch_sets to retrieve records by change_id / patch_set_id
(over 160K per day, over 30% of the overall time spent on ReviewDB) ... I reckon most of them are actually caused by people hitting the list of open changes in Gerrit home page ... and I reckon that most of the 160K queries are returning the same items ;-)
As we do have pagination and the list of first page changes wouldn't typically be more than 100 items, would it make sense to have those items cached to avoid the explosion of SQL queries for patch-sets?
P.S. Of course we wouldn't use the cached value when actually looking at the details of a patch-set
or when performing on-line edit. This wouldn't generate however 160K queries I guess ;-)Feedback is more than welcome :-)Luca.
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
Just an update of my stats from last week:1,165,379 SQL queries for loading patch-sets by ID (!!!) - Taking 22% of time spent on DB683,535 SQL queries for loading changes by ID (!!) - Taking 25% of the time spent on DB223,424 SQL queries for loading the patch-sets associated to a change (!) - Taking 8% of the time spent on DBI have noticed that we currently have a cache for changes (com.google.gerrit.server.git.ChangeCache) but is used only for the Git server part and is not indexed by ID.As people are experiencing problems and increased stress on the DB (remember the discussion thread about the increase of thread pool when upgrading to 2.10.x ?) ... by temporarily caching changes and patch-sets when people are hitting their home screen it would reduce the load on the DB by 55% altogether, which is *HUGE*.
Is anyone interested in working on:- Introducing a change/patch-set cache OR
- Avoiding the use of DB (using only Lucene indexes) for retrieving change/patch-setÂ
Shawn just said all the same things I did :)
I haven't had a chance to look yet but I will today. I was going to be doing some index plumbing work the next few days anyway.
On 8 May 2015 22:22, "Luca Milanesio" <luca.mi...@gmail.com> wrote:
>
> Thanks Dave, thank you all for looking into it :-)
> It would be nice as suggested by David to get if ported as well to 2.10/2.11.
>
I've already cherrypicked the series to stable-2.11
> To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
Is the 2.10 affected as well?
Or is our policy just to cherry pick on the version-1?
On Fri, May 8, 2015 at 3:59 PM, Luca Milanesio <luca.mi...@gmail.com> wrote:Is the 2.10 affected as well?I just debugged it and can confirm that the 2.10 is indeed affected.ÂOr is our policy just to cherry pick on the version-1?I can produce another 2.10.The 4 changes are small and I guess it will not be too difficult to cherry-pick them to the stable-2.10 too.
On Fri, May 8, 2015 at 5:25 PM, SaÅ¡a Živkov <ziv...@gmail.com> wrote:On Fri, May 8, 2015 at 3:59 PM, Luca Milanesio <luca.mi...@gmail.com> wrote:Is the 2.10 affected as well?I just debugged it and can confirm that the 2.10 is indeed affected.ÂOr is our policy just to cherry pick on the version-1?I can produce another 2.10.The 4 changes are small and I guess it will not be too difficult to cherry-pick them to the stable-2.10 too.ÂIt turns out that cherry-picking these series on stable-2.10 is more complex than I expected.There are many hard to follow/resolve conflicts... which likely means that many other commitsneed also to be cherry-picked... So I am not sure if the effort is justified for the stable-2.10.How many 2.10 users are really affected by this issue?
See my short answer in-line :-)
Sent from my iPhoneOn Fri, May 8, 2015 at 5:25 PM, SaÅ¡a Živkov <ziv...@gmail.com> wrote:On Fri, May 8, 2015 at 3:59 PM, Luca Milanesio <luca.mi...@gmail.com> wrote:Is the 2.10 affected as well?I just debugged it and can confirm that the 2.10 is indeed affected.ÂOr is our policy just to cherry pick on the version-1?I can produce another 2.10.The 4 changes are small and I guess it will not be too difficult to cherry-pick them to the stable-2.10 too.ÂIt turns out that cherry-picking these series on stable-2.10 is more complex than I expected.There are many hard to follow/resolve conflicts... which likely means that many other commitsneed also to be cherry-picked... So I am not sure if the effort is justified for the stable-2.10.How many 2.10 users are really affected by this issue?Everyone :-) ... How many can still live with the problem? Most of them by they'll complain of the slowdown (if DB is not fast enough)