Skip to main content

MariaDB tuning help needed

Comments

10 comments

  • 24x7server
    Hello :), Have you tried to update this MySQLTuner scripts recommendations on your server? Please update it on your server and monitor mysql server performance for the next 24 hours. Also try to find out any particular user/databases is using high CPU and memory on your server.
    0
  • zaquria
    Hello :), Have you tried to update this MySQLTuner scripts recommendations on your server? Please update it on your server and monitor mysql server performance for the next 24 hours. Also try to find out any particular user/databases is using high CPU and memory on your server.

    Hi, Thanks for answering :) No we haven't yet, we wanted to make sure that the information given by the Tuner was in the right direction before we started, but to see if there was any other additional tweak, changes or information that could help here. Regards,
    0
  • zaquria
    Just an update. We were given this config for MariaDB, but when restarting the Database it throws out an error:
    [mysqld] symbolic-links=0 max_connections=200 max_user_connections=200 wait_timeout=300 interactive_timeout=300 skip-name-resolve max-connect-errors=1000000 #Slow Queries slow_query_log = 0 long_query_time=5 log_slow_verbosity=Query_plan,explain,Innodb #InnoDB innodb_file_per_table innodb_flush_method=O_DIRECT innodb_flush_log_at_trx_commit=0 innodb_buffer_pool_size =2G innodb_log_file_size=256M innodb_read_io_threads=4 innodb_write_io_threads=4 innodb_buffer_pool_instances=2 innodb_buffer_pool_dump_at_shutdown = 1 innodb_buffer_pool_load_at_startup = 1 transaction-isolation = READ-COMMITTED innodb-defragment=0 innodb_file_format=BARRACUDA innodb_large_prefix=1 #MyISAM Aria key_buffer_size=32M aria_pagecache_buffer_size=256M ft_min_word_len=3 #Thread Cache thread_handling = pool-of-threads #Table cache table_open_cache=1000 open_files_limit=2000 #Buffers join_buffer_size=2M read_buffer_size=128K sort_buffer_size=256K #Query Cache query_cache_type=1 query_cache_size=128M query_cache_limit=6M query_cache_strip_comments=1 #Temporary Tables tmp_table_size=256M max_heap_table_size=256M
    This is the error that is thrown out:
    160619 21:47:14 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 2016-06-19 21:47:14 140260490676256 [Note] /usr/sbin/mysqld (mysqld 10.1.14-MariaDB) starting as process 22323 ... 2016-06-19 21:47:14 140260490676256 [Note] InnoDB: Using mutexes to ref count buffer pool pages 2016-06-19 21:47:14 140260490676256 [Note] InnoDB: The InnoDB memory heap is disabled 2016-06-19 21:47:14 140260490676256 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2016-06-19 21:47:14 140260490676256 [Note] InnoDB: Memory barrier is not used 2016-06-19 21:47:14 140260490676256 [Note] InnoDB: Compressed tables use zlib 1.2.3 2016-06-19 21:47:14 140260490676256 [Note] InnoDB: Using Linux native AIO 2016-06-19 21:47:14 140260490676256 [Note] InnoDB: Using SSE crc32 instructions 2016-06-19 21:47:14 140260490676256 [Note] InnoDB: Initializing buffer pool, size = 2.0G InnoDB: mmap(1107296256 bytes) failed; errno 12 InnoDB: Error: Block 0x7f90ecd2e1e8 incorrect state BUF_BLOCK_POOL_WATCH in buf_LRU_block_free_non_file_page() 160619 21:47:14 [ERROR] mysqld got signal 11 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware.
    Anyone know why this would be the case?
    0
  • cPanelMichael
    Hello, You can search for each specific variable listed under "Variables To Adjust" to determine which configuration value it's referring to. For instance, with "query_cache_size", search engine results show a link to this page: MySQL :: MySQL 5.6 Reference Manual :: 8.10.3 The MySQL Query Cache You can review the comments section of this page to see how other users have utilized this option. As far as the issue when MySQL starts, try disabling the InnoDB variables one by one and restarting MySQL to see which one is the culprit. Thank you.
    0
  • twhiting9275
    High load isn't always high CPU. They can be, and often are very different. Start with adding SSD into your server if you can, offload MySQL onto that. Tweak settings, so you're using RAM not disk for storage and buffering These should both help your situation
    0
  • zaquria
    High load isn't always high CPU. They can be, and often are very different. Start with adding SSD into your server if you can, offload MySQL onto that. Tweak settings, so you're using RAM not disk for storage and buffering These should both help your situation

    Just an update: This was added to the end of the my.cng and once we removed the highlighted line, the issue went away. #Slow Query Log log-slow-queries slow_query_log = 1 slow_query_log_file = /var/log/mysql/mysql_slow.log long_query_time = 2 log-queries-not-using-indexes
    We already have a SSD on the server. You will have to forgive me, but I was kinda thrown into the deep end when it comes to managing a server and I am learning as I go. The above my.cng was kindly worked out for me by someone else. I was under the impression that we were already using RAM rather than disk already? Some long winded info. Orginally the server we were on (CENTOS 6.8 x86_64 virtuozzo " server) had 1 gig of RAM and 2 gig of swap space while we were setting up. This had OPcache, Memcached and Pagespeed running and we had no memory issues at all. We then asked our hosting company to upgrade to 4gig, which they did and then we started having memory issues in WHM and our Forum software. We then contacted our hosting regarding this and they said that the forgot to add Swap memory to the build. However, we are still having issues with memory and slow server speeds
    0
  • zaquria
    Sorry the original server we were on was CENTOS 6.7 x86_64 kvm " server, we are now on CENTOS 6.8 x86_64 virtuozzo " server. Mem: 6340608k total, 5489540k used, 851068k free, 0k buffers Swap: 2097152k total, 267932k used, 1829220k free, 843660k cached
    0
  • cPanelMichael
    We then asked our hosting company to upgrade to 4gig, which they did and then we started having memory issues in WHM and our Forum software. We then contacted our hosting regarding this and they said that the forgot to add Swap memory to the build. However, we are still having issues with memory and slow server speeds

    Hello, Do you notice any VPS resource limits exceeded in the /proc/user_beancounters file (noticeable by fail counts)? Thank you.
    0
  • zaquria
    Hello, Do you notice any VPS resource limits exceeded in the /proc/user_beancounters file (noticeable by fail counts)? Thank you.

    Sorry if a bit long winded.
    Version: 2.5 uid resource held maxheld barrier limit failcnt 41: kmemsize 218483061 226496512 9223372036854775807 9223372036854775807 0 lockedpages 5970 12070 9223372036854775807 9223372036854775807 0 privvmpages 394736 1585152 1585152 1585152 493 shmpages 8827 91275 9223372036854775807 9223372036854775807 0 dummy 0 0 9223372036854775807 9223372036854775807 0 numproc 295 432 9223372036854775807 9223372036854775807 0 physpages 567035 1094965 9223372036854775807 9223372036854775807 0 vmguarpages 0 0 9223372036854775807 9223372036854775807 0 oomguarpages 273815 387012 9223372036854775807 9223372036854775807 0 numtcpsock 37 97 9223372036854775807 9223372036854775807 0 numflock 435 638 9223372036854775807 9223372036854775807 0 numpty 0 3 9223372036854775807 9223372036854775807 0 numsiginfo 0 75 9223372036854775807 9223372036854775807 0 tcpsndbuf 667344 3159888 9223372036854775807 9223372036854775807 0 tcprcvbuf 610568 862224 9223372036854775807 9223372036854775807 0 othersockbuf 131784 1364560 9223372036854775807 9223372036854775807 0 dgramrcvbuf 0 13080 9223372036854775807 9223372036854775807 0 numothersock 78 199 9223372036854775807 9223372036854775807 0 dcachesize 195823133 196116566 9223372036854775807 9223372036854775807 0 numfile 1962 3185 9223372036854775807 9223372036854775807 0 dummy 0 0 9223372036854775807 9223372036854775807 0 dummy 0 0 9223372036854775807 9223372036854775807 0 dummy 0 0 9223372036854775807 9223372036854775807 0 numiptent 74 74 9223372036854775807 9223372036854775807 0
    0
  • cPanelMichael
    The fail count for "privvmpages" suggests the VPS is running out of memory. You may want to consult with your VPS hosting provider to discuss adding additional memory to the VPS. Thank you.
    0

Please sign in to leave a comment.