Hi,
I found that interesting as well because I noticed that our admins enabled
that cache as well, so I read a bit about this the other day.
While it's probably not of much use given the mentioned deprecation of the
feature and that mysql actually seems to recommend that the cache is only
turned on if you know that it will improve performance for you application,
there are two things I found interesting:
1.
Making that cache (too) big can supposedly really drag down the performance
because mysql then spends way too much time managing and reordering the cache
and its index. I found a recommendation to make that cache really small (like
20 MB) and to only increase the size very gently while watching its effects
(SHOW STATUS LIKE '%qcache%';)
-> Maybe the cache's size was the reason why the CPU load dropped so
drastically for Austin after disabling the cache.
2.
You can sort of enable/disable it for certain tables, or rather certain SQL
statements. So it could make sense to look which Sakai tables are frequently
written to (Event? Presence? Session?) and alter the mysql statements used to
query them "from "select foo" to "select sql_no_cache foo" if hibernate
doesn't get in the way for those tables.
(
https://dev.mysql.com/doc/refman/5.5/en/query-cache-in-select.html )
The way this cache works according to the documentation is to cache selects
and their results for each table and then to clear the cached data whenever
data is being written to the table.
So that cache is probably somewhere between useless and really bad for e.g.
the event table which can see multiple writes per second.
There also were some articles concluding that the cache works really bad in
environments with high concurrency (I think for more than four threads? Or was
it cores? I don't remember right now) which sounds pretty much like what you
encountered with "Waiting for query cache lock".
Regards,
Hendrik
On Sonntag, 4. Februar 2018 13:48:41 CET Stephen Marquard wrote:
> Hi Austin,
>
>
> Interesting feedback on the query cache; thanks for posting that.
>
>
> Quite some time ago we tried changing SAKAI_PRESENCE to be an in-memory
> table and it was very bad for performance; I understood then because the
> locking is not as fine-grained (updates would lock the whole table rather
> than the row).
>
>
>
https://dev.mysql.com/doc/refman/5.7/en/memory-storage-engine.html
>
>
> says:
>
>
> "Despite the in-memory processing for MEMORY tables, they are not
> necessarily faster than
> InnoDB<
https://dev.mysql.com/doc/refman/5.7/en/innodb-storage-engine.html>
> tps://
protect-za.mimecast.com/s/WPBJCX6XE5tOB0Z3UkEa_R>
>
https://confluence.sakaiproject.org/display/DOC/Sakai+Admin+Guide+-+Databas
> e+Configuration+and+Tuning<
https://protect-za.mimecast.com/s/t3X3CY6YG5tAkOX
> PCMU1rR> We haven't tried it yet (I didn't find that tip until after we
> disabled caching). I wonder if that would have improved performance enough
> so that we didn't have to disable caching?
>
> Anyway, I hope this helps if anyone else is running into similar issues.
>
> Thanks,
>
> Austin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Sakai Development" group. To unsubscribe from this group and stop
> receiving emails from it, send an email to
>
sakai-dev+...@apereo.org<mailto:
sakai-dev+...@apereo.org>.
> To post to this group, send email to
>
saka...@apereo.org<mailto:
saka...@apereo.org>. Visit this group at
>
https://groups.google.com/a/apereo.org/group/sakai-dev/<
https://protect-za.
>
mimecast.com/s/5LrtCZ4GJ0iQP2YySP8hAV>. Disclaimer - University of Cape Town