In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Use jemalloc or tcmalloc to optimize the installation steps of MYSQL, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
The default memory allocation is c's malloc, and now there are many optimized memory allocation algorithms:
Jemalloc and tcmalloc
In-declaration storage methods are supported since MySQL 5.5.
Install jemalloc
Wget http://www.canonware.com/download/jemalloc/jemalloc-3.4.0.tar.bz2tar xjf jemalloc-3.4.0.tar.bz2cd jemalloc-3.4.0./configure-- prefix=/usr/local/jemalloc-- libdir=/usr/local/lib make & & make installecho'/ usr/local/lib' > / etc/ld.so.conf.d/local.confldconfig
[root@host-192-168-1-56 mysql] # cp / usr/local/lib/libjemalloc.so / usr/lib64/mysql/libjemalloc.so
Mysql uses jemalloc
Modify the configuration file
[mysqld_safe]
Malloc-lib=/usr/lib64/mysql/libjemalloc.so # specify libjemalloc.so
Restart mysql to check whether it is effective
[root@host-192-168-1-56 mysql] # lsof-n | grep jemalloc
Mysqld 6032 mysql mem REG 252,1 4781206 320288 / usr/lib64/mysql/libjemalloc.so
Today, my colleagues and I tested jemalloc before and after using sysbench, and the overall improvement was more than 20%.
After reading the above, have you mastered the installation steps of optimizing MYSQL using jemalloc or tcmalloc? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.