標籤:mysql 記憶體最佳化之關閉numa
關閉numa,記憶體最佳化,至於什麼是numa,大家自己上網上查一下,文章很多。
最近在測試mariadb,要想選型,千萬不要聽別人說那個好那個不好,要自己實踐,說白了就是多做實驗,多敲命令,自己去感受,適合自己的才是最好的。
至於選什麼,就看你能hold住那種資料庫了。
mysql 5.6.x[[email protected] ~]# yum install numactl -y [[email protected] ~]# numactl --interleave=all mysqld_safe --defaults-file=/etc/my.cnf &[1] 7592[[email protected] ~]# [[email protected] ~]# 170103 19:04:34 mysqld_safe Logging to ‘/data/mysqllogs/error.log‘.170103 19:04:34 mysqld_safe Starting mysqld daemon with databases from /data/mysqldatamariadb 10.1.x[[email protected] ~]# mysqld_safe --defaults-file=/etc/my.cnf --numa-interleave & [1] 4066[[email protected] ~]# 170103 19:06:52 mysqld_safe Logging to ‘/log/mysql/error.log‘.
mysql & mariadb mysqld_safe的區別
最近一直在和賀春暘老師學習mariadb,自己也在不斷地測試,發現mariadb 的服務層做的確實要比
mysql 要好很多。看參數自己找區別吧。
Mariadb [[email protected] ~]# mysqld_safe --helpUsage: /usr/bin/mysqld_safe [OPTIONS] --no-defaults Don‘t read the system defaults file --core-file-size=LIMIT Limit core files to the specified size --defaults-file=FILE Use the specified defaults file --defaults-extra-file=FILE Also use defaults from the specified file --ledir=DIRECTORY Look for mysqld in the specified directory --open-files-limit=LIMIT Limit the number of open files --crash-script=FILE Script to call when mysqld crashes --timezone=TZ Set the system timezone --malloc-lib=LIB Preload shared library LIB if available --mysqld=FILE Use the specified file as mysqld --mysqld-version=VERSION Use "mysqld-VERSION" as mysqld --dry-run Simulate the start to detect errors but don‘t start --nice=NICE Set the scheduling priority of mysqld --no-auto-restart Exit after starting mysqld --nowatch Exit after starting mysqld --plugin-dir=DIR Plugins are under DIR or DIR/VERSION, if VERSION is given --skip-kill-mysqld Don‘t try to kill stray mysqld processes --syslog Log messages to syslog with ‘logger‘ --skip-syslog Log messages to error log (default) --syslog-tag=TAG Pass -t "mysqld-TAG" to ‘logger‘ --flush-caches Flush and purge buffers/caches before starting the server --numa-interleave Run mysqld with its memory interleaved on all NUMA nodesAll other options are passed to the mysqld program.
MySQL [[email protected] ~]# mysqld_safe --helpUsage: /usr/bin/mysqld_safe [OPTIONS] --no-defaults Don‘t read the system defaults file --defaults-file=FILE Use the specified defaults file --defaults-extra-file=FILE Also use defaults from the specified file --ledir=DIRECTORY Look for mysqld in the specified directory --open-files-limit=LIMIT Limit the number of open files --core-file-size=LIMIT Limit core files to the specified size --timezone=TZ Set the system timezone --malloc-lib=LIB Preload shared library LIB if available --mysqld=FILE Use the specified file as mysqld --mysqld-version=VERSION Use "mysqld-VERSION" as mysqld --nice=NICE Set the scheduling priority of mysqld --plugin-dir=DIR Plugins are under DIR or DIR/VERSION, if VERSION is given --skip-kill-mysqld Don‘t try to kill stray mysqld processes --syslog Log messages to syslog with ‘logger‘ --skip-syslog Log messages to error log (default) --syslog-tag=TAG Pass -t "mysqld-TAG" to ‘logger‘All other options are passed to the mysqld program.
本文出自 “roidba” 部落格,請務必保留此出處http://roidba.blog.51cto.com/12318731/1888532
mysql 記憶體最佳化之關閉numa