Skip to main content

Unusual load MySQL

Comments

5 comments

  • thinkbot
    key_buffer_size set over 110M also increase innodb_buffer_pool_size=560M InnoDB can use more and decreate table cache to 2 In your case I would turn on query cache Maybe it's time to optimize that code and add some caching [!!] Joins performed without indexes: 53107745 You should review database structure if it needs some indexes I would suggest here simple solution, add log-queries-not-using-indexes track those queries not using indexes, and add those indexes, or if necessary optimize queries to utilize indexes In most cases when basic mysql optimizations (few key settings) are done, the biggest part that can impact performance is the code People tend to search some magic solutions in mysql, some people have tens of variables in their my.cnf, but they dont look into their code
    0
  • bassrehab
    Thank you for your reply. [quote="thinkbot, post: 1600862"> key_buffer_size set over 110M also increase innodb_buffer_pool_size=560M InnoDB can use more and decreate table cache to 2
    key_buffer_size is now set to 128M (~myisam database size) Innodb ~ i haven't changed. decreate table cache to 2? you mean 2048? [quote="thinkbot, post: 1600862"> In your case I would turn on query cache
    Query cache doesnt help my case at all. There is frequent defragmentation and a constant overhead. I have checked with various values from 128M to 32M, and cache_min_res. [quote="thinkbot, post: 1600862"> Maybe it's time to optimize that code and add some caching [!!] Joins performed without indexes: 53107745 You should review database structure if it needs some indexes I would suggest here simple solution, add log-queries-not-using-indexes track those queries not using indexes, and add those indexes, or if necessary optimize queries to utilize indexes
    Yes, i am aware of non-index using joins. Its is not a new thing for our setting, i have always had non-index using joins (i knows its bad for performance). Anyways, My problem is investigating the "sudden" rise in mysql load over last one week.
    0
  • thinkbot
    yes, I mean table cache 2048 but did y ou check what type of queries are those "non-index" can you set long query time to 0 and then run cd /root wget
    0
  • cPanelMichael
    You may also want to try using a command such as "mysqladmin processlist" to get a better idea of what's happening when you notice higher than normal MySQL usage (since you stated this has only started recently). Thank you.
    0
  • bassrehab
    A quick update: 1. key_buffer_size now set at 128M 2. File open limit (auto set by cpanel ~8250) 3. Table Cache ~ 2048 4. Current Mysql load ~ 55% 5. http traffic checked for any attacks (nothing unusual) 6. Had done hard restarts, checked hardwares for r/w faults none. I am not sure why the load keeps increasing. Its as if some kinda overhead is building on. And it seemingly is incremental. My next plan of action is just try disabling one db at a time and probably isolate the menace. @thinkbot - i wonder if fractional slow_query times can be set. @cPanelMichael - have done that already. I was hoping to find sleeping queries or anything unusual but none there either.
    0

Please sign in to leave a comment.