mysql numa_mysql 内存优化之关闭numa

关闭numa,内存优化,至于什么是numa,大家自己上网上查一下,文章很多。

最近在测试mariadb,要想选型,千万不要听别人说那个好那个不好,要自己实践,说白了就是多做实验,多敲命令,自己去感受,适合自己的才是最好的。

至于选什么,就看你能hold住那种数据库了。

mysql 5.6.x

[root@mysql92 ~]# yum install numactl -y

[root@mysql92 ~]# numactl --interleave=all mysqld_safe --defaults-file=/etc/my.cnf &

[1] 7592

[root@mysql92 ~]#

[root@mysql92 ~]# 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/mysqldata

mariadb 10.1.x

[root@mysql91 ~]# mysqld_safe --defaults-file=/etc/my.cnf --numa-interleave &

[1] 4066

[root@mysql91 ~]# 170103 19:06:52 mysqld_safe Logging to '/log/mysql/error.log'.

mysql & mariadb mysqld_safe的区别

最近一直在和贺春旸老师学习mariadb,自己也在不断地测试,发现mariadb 的服务层做的确实要比

mysql 要好很多。看参数自己找区别吧。Mariadb

[root@mysql91 ~]# mysqld_safe --help

Usage: /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 nodes

All other options are passed to the mysqld program.MySQL

[root@mysql92 ~]# mysqld_safe --help

Usage: /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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值