Skip to main content

MySQL Optimization - Dedicated Server

Comments

4 comments

  • ModServ
    Of course you will suffer from high load, your MySQL only uses 5.6GB of ram let alone that you've assigned 21.3GB of ram to MySQL although you don't have this amount. About ram given to MySQL, you can use this formula to calculate it: MySQL Server Memory Usage = Sum of Global Buffers + (number of Connection * Per thread memory variables) Global buffers include: key_buffer_size innodb_buffer_pool_size innodb_additional_mem_pool_size innodb_log_buffer_size query_cache_size Per thread variables include: read_buffer_size read_rnd_buffer_size sort_buffer_size join_buffer_size thread_stack net_buffer_length or you could use MySQL tuning primer to do the heavy lifting for you (calculation and stuff):
    0
  • NEK4TE
    Thanks for responding. What exactly do you mean by ' your MySQL only uses 5.6GB of ram let alone that you've assigned 21.3GB of ram to MySQL although you don't have this amount ' - i am a bit confused by this, i apologize. The system has 32GB of RAM, currently there is around 24GB free
    total used free shared buffers cached Mem: 32007 7846 24161 81 63 712 -/+ buffers/cache: 7070 24936 Swap: 8189 2336 5853
    Tuning primer Output:
    SLOW QUERIES The slow query log is NOT enabled. Current long_query_time = 10.000000 sec. You have 21 out of 610200 that take longer than 10.000000 sec. to complete Your long_query_time seems to be fine BINARY UPDATE LOG The binary update log is NOT enabled. You will not be able to do point in time recovery See http://dev.mysql.com/doc/refman/5.6/en/point-in-time-recovery.html WORKER THREADS Current thread_cache_size = 500 Current threads_cached = 13 Current threads_per_sec = 0 Historic threads_per_sec = 0 Your thread_cache_size is fine MAX CONNECTIONS Current max_connections = 256 Current threads_connected = 5 Historic max_used_connections = 18 The number of used connections is 7% of the configured maximum. You are using less than 10% of your configured max_connections. Lowering max_connections could help to avoid an over-allocation of memory See "MEMORY USAGE" section to make sure you are not over-allocating INNODB STATUS Current InnoDB index space = 722 M Current InnoDB data space = 3.74 G Current InnoDB buffer pool free = 53 % Current innodb_buffer_pool_size = 8.00 G Depending on how much space your innodb indexes take up it may be safe to increase this value to up to 2 / 3 of total system memory MEMORY USAGE Max Memory Ever Allocated : 10.73 G Configured Max Per-thread Buffers : 10.25 G Configured Max Global Buffers : 10.01 G Configured Max Memory Limit : 20.26 G Physical Memory : 31.25 G Max memory limit seem to be within acceptable norms KEY BUFFER Current MyISAM index space = 23 M Current key_buffer_size = 1.00 G Key cache miss rate is 1 : 278 Key buffer free ratio = 81 % Your key_buffer_size seems to be fine QUERY CACHE Query cache is enabled Current query_cache_size = 1.00 G Current query_cache_used = 13 M Current query_cache_limit = 30 M Current Query cache Memory fill ratio = 1.36 % Current query_cache_min_res_unit = 4 K Your query_cache_size seems to be too high. Perhaps you can use these resources elsewhere MySQL won't cache query results that are larger than query_cache_limit in size SORT OPERATIONS Current sort_buffer_size = 16 M Current read_rnd_buffer_size = 768 K Sort buffer seems to be fine JOINS Current join_buffer_size = 8.00 M You have had 238 queries where a join could not use an index properly join_buffer_size >= 4 M This is not advised You should enable "log-queries-not-using-indexes" Then look for non indexed joins in the slow query log. OPEN FILES LIMIT Current open_files_limit = 200266 files The open_files_limit should typically be set to at least 2x-3x that of table_cache if you have heavy MyISAM usage. Your open_files_limit value seems to be fine TABLE CACHE Current table_open_cache = 100000 tables Current table_definition_cache = 32000 tables You have a total of 667 tables You have 1249 open tables. The table_cache value seems to be fine TEMP TABLES Current max_heap_table_size = 1.00 G Current tmp_table_size = 1.00 G Of 131200 temp tables, 5% were created on disk Created disk tmp tables ratio seems fine TABLE SCANS Current read_buffer_size = 16 M Current table scan ratio = 802769 : 1 read_buffer_size is over 8 MB there is probably no need for such a large read_buffer TABLE LOCKING Current Lock Wait ratio = 1 : 25550 Your table locking seems to be fine
    Please advise
    0
  • cPanelMichael
    Hello :) I just wanted to make a quick note that it's import to upload screenshots/images directly to the thread instead of linking to third-party image hosting websites. Feel free to upload the image from your initial post and continue to seek user-feedback on your MySQL configuration. Thank you.
    0
  • NEK4TE
    Hello Michael, I apologize for that. I will be waiting (for hopefully) more suggestions about this. Regards
    0

Please sign in to leave a comment.