下载

http://www.canonware.com/jemalloc/download.html

下载 wget http://www.canonware.com/download/jemalloc/jemalloc-3.5.0.tar.bz2

tar jxvf jemalloc-3.5.0.tar.bz2

cd jemalloc

./configure && make && make install

echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf

ldconfig

1. 优化Mongodb

yum -y install numactl

编译安装以后!! 重启Mongodb 进程

export LD_PRELOAD='/usr/local/lib/libjemalloc.so' && numactl --interleave=all /opt/local/mongodb/bin/mongod xxxxx

2. 优化Nginx

重新编译 Nginx

./configure --user=upload --group=upload --prefix=/opt/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --with-ld-opt="-ljemalloc"

make && make install

lsof -n | grep jemalloc

验证jemalloc 是否生效

jemalloc Mongodb Nginx 优化的更多相关文章

  1. nginx优化

    此文章非原创,出自鸟哥之手~ http://blog.chinaunix.net/uid-25266990-id-2985541.html 改排版改得多,当然红色部分要注意下,用得较多 ------- ...

  2. 2.Nginx优化

    [教程主题]:Nginx优化 [课程录制]: 创E [主要内容] Nginx 优化 nginx介绍 Nginx是俄罗斯人编写的十分轻量级的HTTP服务器,Nginx,它的发音为"engine ...

  3. MongoDB 性能优化五个简单步骤

    MongoDB 一直是最流行的 NoSQL,而根据 DB-Engines Ranking 最新的排行,时下 MongoDB 已经击败 PostgreSQL 跃居数据库总排行的第四位,仅次于 Oracl ...

  4. Nginx优化具体,应对高并发

     nginx指令中的优化(配置文件) worker_processes 8; nginx进程数,建议依照cpu数目来指定.一般为它的倍数. worker_cpu_affinity 00000001 ...

  5. CentOS6.5 Nginx优化编译配置[续]

    继续上文CentOS6.5 Nginx优化编译配置本文记录有关Nginx系统环境的一些细节设置,有关Nginx性能调整除了配置文件吻合服务器硬件之前就是关闭不必要的服务.磁盘操作.文件描述符.内核调整 ...

  6. Nginx优化use参数epoll,kqueue,rtsig,eventport,poll

    转自:http://blog.sina.com.cn/s/blog_5eaf88f10100gkrq.html Nginx use参数分析对比 下图对比了poll select epoll和kqueu ...

  7. nginx优化php-fpm优化 压力测试达到每分150万访问量webbench网站压力

    webbench最多可以模拟3万个并发连接去测试网站的负载能力,个人感觉要比Apache自带的ab压力测试工具好,安装使用也特别方便. 1.适用系统:Linux 2.编译安装:引用wget http: ...

  8. lnmp使用socket方式连接nginx优化php-fpm性能

    lnmp使用socket方式连接nginx优化php-fpm性能 Nginx连接fastcgi的方式有2种:TCP和unix domain socket 什么是Unix domain socket?- ...

  9. Nginx优化(十七)

    [教程主题]:Nginx优化 [课程录制]: 创E [主要内容] Nginx 优化 nginx介绍 Nginx是俄罗斯人编写的十分轻量级的HTTP服务器,Nginx,它的发音为“engine X”,是 ...

随机推荐

  1. Python 线程,进程

    Threading用于提供线程相关的操作,线程是应用程序中工作的最小单元 线程不能实现多并发 只能实现伪并发 每次工作 只能是一个线程完成 由于python解释器 原生是c  原生线程 底层都会有一把 ...

  2. Mycat 依赖包解读

    1.curator - zookeeper开源客户端框架 2.dom4j - xml解析包 3.druid - 阿里巴巴推出的国产数据库连接池,同时具备监控功能,性能优于JDBC和C3P0 4.ehc ...

  3. git 提交到github时不用每次都输入用户名,密码

    Permanently authenticating with Git repositories, Run following command to enable credential caching ...

  4. execlp("ls","flw","-?",(char *)0) 为什么少了最后的一个参数就不行?

    execlp("ls","flw","-?",(char *)0) 为什么少了最后的一个参数就不行?

  5. UIImageView 浅析

    UIImageView summary UIImageView极其常用,功能比较专一:显示图片 pooperty @property(nonatomic,retain) UIImage *image; ...

  6. [转]探究java IO之FileInputStream类

    使用FileInputStream类创建的InputStream对象可以用于从文件读取内容.两个常用的构造函数如下所示: ? 1 2 FileInputStream(String filePath) ...

  7. socket通信的json数据传输与获取

    本文是基于scoket通信的tcp来进行数据的json格式传输与获取的. 首先,我们先要下载AsyncSockethttps://github.com/robbiehanson/CocoaAsyncS ...

  8. 本地php 连接 MySQL

    1. 在D:\xampp\htdocs下创建test.php <?php $dbhost = 'localhost:3306'; //mysql服务器主机地址 $dbuser = 'root'; ...

  9. 在window系统下搭建基于ssh的git服务器

    以下是基于window server 2012搭建的,学习搭建过程需要很多问题,找了许多文章做了一下总结. 1.所需的软件 Git for Windows: MsysGit(Git-1.7.4-pre ...

  10. C# 通过接口 post 请求

    /// <summary> /// 提交数据请求 方法一 /// </summary> /// <param name="POSTURL">请求 ...