[Building Sakai] Mysql 5.1 and Query Cache

Earle Nietzel earle.nietzel at gmail.com
Thu Aug 18 12:51:08 PDT 2011


You can check the cache is actually being used with:

mysql> SHOW STATUS LIKE '%qcache%';
+-------------------------+----------+
| Variable_name           | Value    |
+-------------------------+----------+
| Qcache_free_blocks      | 18892    |
| Qcache_free_memory      | 75917440 |
| Qcache_hits             | 35082405 |
| Qcache_inserts          | 27827714 |
| Qcache_lowmem_prunes    | 8644854  |
| Qcache_not_cached       | 86923450 |
| Qcache_queries_in_cache | 59540    |
| Qcache_total_blocks     | 138485   |
+-------------------------+----------+

Earle



On Wed, Aug 17, 2011 at 11:19 AM, Jennings, Michael
<mike_jennings at unc.edu>wrote:

>  Here are the values from the Mysql command ****
>
> ** **
>
> Show variables like ‘%cache%’;****
>
> ** **
>
> Variable_name                 Value****
>
> binlog_cache_size           1048576****
>
> binlog_stmt_cache_size               32768****
>
> have_query_cache         YES****
>
> key_cache_age_threshold          300****
>
> key_cache_block_size   1024****
>
> key_cache_division_limit             100****
>
> max_binlog_cache_size                18446744073709547520****
>
> max_binlog_stmt_cache_size    18446744073709547520****
>
> query_cache_limit          4194304****
>
> query_cache_min_res_unit        4096****
>
> query_cache_size           134217728****
>
> query_cache_type          ON****
>
> query_cache_wlock_invalidate                 OFF****
>
> table_definition_cache                 400****
>
> table_open_cache          2048****
>
> thread_cache_size          8****
>
> ** **
>
> Also should I change useServerPrepStmts to useServerPrepareStmts?****
>
> ** **
>
> Thanks,****
>
> ** **
>
> Mike****
>
> ** **
>
>
> ==============================================================================
> ****
>
> Mike Jennings****
>
> Teaching and Learning Developer****
>
> University of North Carolina at Chapel Hill****
>
> ** **
>
> Office: (919) 843-5013****
>
> Cell: (919) 442-8337 ****
>
> E-mail: mike_jennings at unc.edu****
>
> ** **
>
> *From:* Sam Ottenhoff [mailto:ottenhoff at longsight.com]
> *Sent:* Wednesday, August 17, 2011 11:05 AM
> *To:* Jennings, Michael
> *Cc:* sakai-dev at collab.sakaiproject.org
> *Subject:* Re: [Building Sakai] Mysql 5.1 and Query Cache****
>
> ** **
>
> The settings you added to the connection string should make this work. Can
> you confirm your MySQL settings?****
>
> ** **
>
> mysql> show variables like '%cache%';****
>
> On Wed, Aug 17, 2011 at 11:00 AM, Jennings, Michael <mike_jennings at unc.edu>
> wrote:****
>
> Hi,****
>
>  ****
>
> We currently have mysql 5.1 running with Query Cache enabled but it does
> not appear that the Hibernate Prepared statements are being sent to the
> query cache.  ****
>
>  ****
>
> We are using
> url at javax.sql.BaseDataSource=jdbc:mysql://############:3306/sakai?useUnicode=true&characterEncoding=UTF-8&useServerPrepStmts=false&cachePrepStmts=true&prepStmtCacheSize=4096&prepStmtCacheLimit=4096
> ****
>
>  ****
>
> For our connection string..****
>
>  ****
>
> This is Sakai 2.7.0….****
>
>  ****
>
> hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect****
>
>  ****
>
> I was reading this issue https://jira.sakaiproject.org/browse/SAK-9250 and
> tried to change useServerPrepStmts= false to useServerPrepareStmts= false,
> but that did not work.****
>
>  ****
>
> Any help would be appreciated.****
>
>  ****
>
> Thanks,****
>
>  ****
>
> Mike Jennings****
>
>  ****
>
>
> ==============================================================================
> ****
>
> Mike Jennings****
>
> Teaching and Learning Developer****
>
> University of North Carolina at Chapel Hill****
>
>  ****
>
> Office: (919) 843-5013****
>
> Cell: (919) 442-8337 ****
>
> E-mail: mike_jennings at unc.edu****
>
>  ****
>
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"****
>
> ** **
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20110818/4e1ed497/attachment.html 


More information about the sakai-dev mailing list