ubuntu server下使用Google Performance Tools优化MySQL在高并
step 1. 因为是64位的系统,所以先要安装libunwind,32位系统可以忽略此步 wget http://download.savannah.gnu.org/releases/libunwind/libunwind-1.1.tar.gztar zxvf libunwind-1.1.tar.gzcd libunwind-1.1/CFLAGS=-fPIC ./configure --enable-sharedmake CF
step 1. 因为是64位的系统,所以先要安装libunwind,32位系统可以忽略此步
wget http://download.savannah.gnu.org/releases/libunwind/libunwind-1.1.tar.gz tar zxvf libunwind-1.1.tar.gz cd libunwind-1.1/ CFLAGS=-fPIC ./configure --enable-shared make CFLAGS=-fPIC make CFLAGS=-fPIC install
step 2.安装Google Performance Tools
wget https://gperftools.googlecode.com/files/gperftools-2.1.tar.gz tar zxvf gperftools-2.1.tar.gz cd gperftools-2.1/ ./configure make -j8 make install echo "/usr/local/lib" > /etc/ld.so.conf.d/usr_local_lib.conf /sbin/ldconfig
step 3. 修改MySQL启动脚本(根据你的MySQL安装位置而定):
vi /usr/local/mysql/bin/mysqld_safe
在# executing mysqld_safe的下一行,加上:
export LD_PRELOAD=/usr/local/lib/libtcmalloc.so
保存后退出,然后重启MySQL服务器。
step 4. 使用lsof命令查看tcmalloc是否起效:
lsof -n|grep tcmalloc
如果发现以下信息,就证明配置成功了。
mysqld 12278 mysql mem REG 202,1 2241773 1186797 /usr/local/lib/libtcmalloc.so.4.1.2
原文地址:ubuntu server下使用Google Performance Tools优化MySQL在高并, 感谢原作者分享。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Currently, four new Pixel smartphones are anticipated to land this autumn. To recap, the series is rumoured to feature thePixel 9 and Pixel 9 Pro at launch. However, the Pixel 9 Pro will be a rival to the iPhone 16 Pro rather than a Pixel 8 Pro (curr

For many users, hacking an Android TV box sounds daunting. However, developer Murray R. Van Luyn faced the challenge of looking for suitable alternatives to the Raspberry Pi during the Broadcom chip shortage. His collaborative efforts with the Armbia

Google AI has started to provide developers with access to extended context windows and cost-saving features, starting with the Gemini 1.5 Pro large language model (LLM). Previously available through a waitlist, the full 2 million token context windo

Google recently responded to the performance concerns about the Tensor G4 of the Pixel 9 line. The company said that the SoC wasn't designed to beat benchmarks. Instead, the team focused on making it perform well in the areas where Google wants the c

Google's AI assistant, Gemini, is set to become even more capable, if the APK teardown of the latest update (v15.29.34.29 beta) is to be considered. The tech behemoth's new AI assistant could reportedly get several new extensions. These extensions wi

The Pixel 9 series is almost here, having been scheduled for an August 13 release. Based on recent rumours, the Pixel 9, Pixel 9 Pro and Pixel 9 Pro XL will mirror the Pixel 8 and Pixel 8 Pro (curr. $749 on Amazon) by starting with 128 GB of storage.

Google has introduced DisplayPort Alternate Mode with the Pixel 8 series, and it's present on the newly launched Pixel 9 lineup. While it's mainly there to let you mirror the smartphone display with a connected screen, you can also use it for desktop

A few months have passed since Android Authority demonstrated a new Android desktop mode that Google had hidden away within Android 14 QPR3 Beta 2.1. Arriving hot on the heels of Google adding DisplayPort Alt Mode support for the Pixel 8 and Pixel 8
