众所周知,glusterfs对小文件而言,就是个鸡肋,特别是在一个目录下有过W的小文件图片时,ls简单就是个坑,下面我对线上的glusterfs参数做一些优化调整,调整的命令:

gluster volume set VOLNAME OPTION PARAMETER

参数如下:

cluster.data-self-heal-algorithm      ( full/diff )
cluster.min-free-disk ( Required minimum free disk space as a percentage like 30%)
cluster.self-heal-window-size ( 0 < data-self-heal-window-size < 1025)
cluster.stripe-block-size (size in bytes )
cluster.quorum-type (quorum method)
cluster.quorum-count (# needed for quorum)
diagnostics.brick-log-level ( DEBUG|INFO|WARNING|ERROR|CRITICAL|NONE|TRACE )
diagnostics.client-log-level (DEBUG|INFO|WARNING|ERROR|CRITICAL|NONE|TRACE )
diagnostics.latency-measurement ( ON|OFF )
diagnostics.dump-fd-stats ( ON|OFF )
features.quota-timeout ( 0 < 3600 secs )
geo-replication.indexing ( ON|OFF )
network.frame-timeout ( 1800 secs)
network.ping-timeout ( 42 secs)
performance.cache-max-file-size ( size in bytes )
performance.cache-min-file-size ( size in bytes )
performance.cache-refresh-timeout ( 0 < cache-timeout < 61 )
performance.cache-size ( size in bytes )
performance.flush-behind ( ON|OFF)
performance.io-thread-count ( 0 < io-threads < 65 )
performance.write-behind-window-size ( Write-behind cache size )
auth.allow ( valid IP address which includes wild card patterns including *, such as 192.168.1.* )
auth.reject
nfs.disable (ON|OFF)
nfs.enable-ino32 (ON|OFF)
nfs.export-dir (Enable|Disable)
nfs.export-volumes (ON|OFF)
nfs.addr-namelookup (ON|OFF)
nfs.register-with-portmap (ON|OFF)
nfs.port (38465 to 38467)
nfs.rpc-auth-unix (ON|OFF)
nfs.rpc-auth-null (ON|OFF)
nfs.rpc-auth-allow (IP address or Host name)
nfs.rpc-auth-reject (IP address or Host name)
nfs.ports-insecure (ON|OFF)
nfs.trusted-sync (ON|OFF)
nfs.trusted-write (ON|OFF)
nfs.volume-access (read-write|read-only)
rpc-auth-allow-insecure (ON|OFF)

各个参数说明:

Note: The default options given here are hard coded in the source file and is subject to modification at any given time. The following default values may not be the same for all versions.

调整案例:

# gluster volume set v3_upload performance.cache-size 4GB
volume set: success
# gluster volume set v3_upload auth.allow 10.16.1.93
volume set: success
# gluster volume set v3_upload performance.io-thread-count 32
volume set: success # gluster volume info Volume Name: v3_upload
Type: Striped-Replicate
Volume ID: 401b5343-df8f-4c5d-a1c2-0363fa9d4591
Status: Started
Number of Bricks: 1 x 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: 10.16.1.103:/data/dsrv1/v1
Brick2: 10.16.1.97:/data/dsrv1/v2
Brick3: 10.16.1.103:/data/dsrv2/v3
Brick4: 10.16.1.97:/data/dsrv2/v4
Options Reconfigured:
auth.allow: 10.16.1.93
performance.io-thread-count: 32
performance.cache-size: 4GB

对一个4W多文件的目录进行ls查看:

调整前:

real    1m16.063s
user 0m1.077s
sys 0m1.825s

调整后,当然第一次读取肯定是慢的,缓存之后,执行时间上还是有所提升的:

one:
real 0m48.976s
user 0m1.137s
sys 0m1.525s
two:
real 0m55.031s
user 0m1.212s
sys 0m1.794s

原文参考http://ju.outofmemory.cn/entry/109435

还可以参考https://docs.gluster.org/en/latest/Administrator%20Guide/Managing%20Volumes/

GlusterFS PERFORMANCE TUNING的更多相关文章

  1. Performance Tuning

    本文译自Wikipedia的Performance tuning词条,原词条中的不少链接和扩展内容非常值得一读,翻译过程中暴露了个人工程学思想和英语水平的不足,翻译后的内容也失去很多准确性和丰富性,需 ...

  2. Spark SQL 之 Performance Tuning & Distributed SQL Engine

    Spark SQL 之 Performance Tuning & Distributed SQL Engine 转载请注明出处:http://www.cnblogs.com/BYRans/ 缓 ...

  3. IBM HTTP Server Performance Tuning

    IBM HTTP Server Performance Tuninghttp://publib.boulder.ibm.com/httpserv/ihsdiag/ihs_performance.htm ...

  4. 30 分钟快快乐乐学 SQL Performance Tuning

    转自:http://www.cnblogs.com/WizardWu/archive/2008/10/27/1320055.html 有些程序员在撰写数据库应用程序时,常专注于 OOP 及各种 fra ...

  5. PostgreSQL Hardware Performance Tuning

    Bruce Momjian POSTGRESQL is an object-relational database developed on the Internet by a group of de ...

  6. Performance Tuning guide 翻译 || 前言

    CSDN 对格式支持比較弱,能够到http://user.qzone.qq.com/88285879/blog/1399382878 看一致的内容. 前言Preface 包含例如以下几个小节 l Au ...

  7. Performance Tuning guide 翻译 || Performance Tuning Guide 11G中新增特性

    CSDN 对格式支持比較弱.能够到http://user.qzone.qq.com/88285879/blog/1399382878 看一致的内容. Performance Tuning Guide  ...

  8. mysql优化---优化工具MySQL performance tuning primer script

    MySQL performance tuning primer script一个简单好用的mysql优化工具,其实一个shell脚本 下载: $ wget http://www.day32.com/M ...

  9. 老李分享: Oracle Performance Tuning Overview 翻译下

    1.2性能调优特性和工具 Effective data collection and analysis isessential for identifying and correcting perfo ...

随机推荐

  1. 使用dig命令解析域名

    Linux下解析域名除了使用nslookup之外,开可以使用dig命令来解析域名,dig命令可以得到更多的域名信息. dig的全称是 (domain information groper).它是一个用 ...

  2. 搭建一个SVN

    1--------------------------------------首先需要下载SVN---------------------------------------------------- ...

  3. HDU 3546

    http://acm.hdu.edu.cn/showproblem.php?pid=3546 题意:10个寄存器初值为1,有加乘赋值运算,最多30w次运算,大数最多5000位,问最后10个寄存器的结果 ...

  4. chapter02“良/恶性乳腺癌肿瘤预测”的问题

    最近比较闲,是时候把自己以前看的资料整理一下了. LogisticRegression:由于在训练过程中考虑了所有的样本对参数的影响,因此不一定获得最佳的分类器,对比下一篇 svm只用支持向量来帮助决 ...

  5. 转:Linux实时将所有输出重定向到文件

    转自: Linux的重定向机制十分好用,我们经常需要在服务器上挂起一个服务程序,然后将该程序的所有输出重定向到某个文件,这样即使我们注销了用户,程序依然在linux服务器上运行着. 但是重定向的输出经 ...

  6. 记录几个ubuntu环境下的php相关的路径

    php路径 /usr/bin/php phpize5 /usr/bin/phpize5 php5-fpm /usr/sbin/php5-fpm php所有的配置文件 /etc/php5/fpm 重启p ...

  7. CTF-练习平台-Misc之 猜?

    六.猜? 打开图片后发现是一个半个脸被遮住的美女,再联系到题目是“猜”,答案又是一个人的名字全拼,所以熟悉的人都知道这是刘亦菲,把拼音输进去就可以啦.

  8. 枚举大小为k的子集

    这种位操作不大可能分析出来,先看代码再分析. 代码 使用条件:\(k>0\) void solve(int n,int k) { for(int comb = (1 << k) - ...

  9. 【VB.NET】——若水归海

    版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/successA/article/details/34496209 看完台湾微软特约资深讲师的VB.N ...

  10. 在虚拟机中使用Ghost系统盘安装

    我们在网上下载了很多的Ghost版的系统盘,如番茄花园的GHOST.深度GHOST.中关村GHOST.电脑公司装机GHOST,等等的很多,那么如何安装到虚拟机中?这里讲解给初学者的,如果你认为你是高手 ...