众所周知,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. PAT 列车厢调度   (25分)(栈和容器的简单应用)

    1 ====== <--移动方向 / 3 ===== \ 2 ====== -->移动方向 大家或许在某些数据结构教材上见到过“列车厢调度问题”(当然没见过也不要紧).今天,我们就来实际操 ...

  2. 各种CTF的WP

    http://l-team.org/archives/43.html PlaidCTF-2014-twenty/mtpox/doge_stege-Writeup http://l-team.org/a ...

  3. 2012年东京区域赛 UVAlive6182~6191

    暑假训练场 A(UVAL6182). 凯神看了敲掉的题目,还没有看过 #include <iostream> #include <memory.h> using namespa ...

  4. sql server CLR

    1. 配置sql server 启用CLR 在SQL Server2005/2008里面,CLR默认是关闭的.可以使用如下SQL语句开启CLR. sp_configure 'show advanced ...

  5. 根据日期计算星期几----蔡勒(Zeller)公式推导

    计算给定日期是星期几,好象是编程都会遇到的问题,最近论坛里也有人提到这个问题,并给出了一个公式:             W=   (d+2*m+3*(m+1)/5+y+y/4-y/100+y/400 ...

  6. nyoj 单调递增最长子序列

    单调递增最长子序列 时间限制:3000 ms  |  内存限制:65535 KB 难度:4   描述 求一个字符串的最长递增子序列的长度如:dabdbf最长递增子序列就是abdf,长度为4   输入 ...

  7. js 坐标兼容性

    不同浏览器对坐标属性的支持:

  8. numpy之meshgrid和where

    meshgrid np.meshgrid() np.meshgrid从坐标向量返回坐标矩阵. 这样说可能很抽象.举个例子. x = np.arange(-2,2) y = np.arange(0,3) ...

  9. http常用状态码说明

    HTTP状态码:每发出一个http请求之后,就会有一个响应,http本身会有一个状态码,来标示这个请求是否成功,常见状态码: 200,2开头的都表示这个请求发送成功,最常见的就是200 300,3开头 ...

  10. RK3288 wifi模块打开或关闭5G信号

    CPU:RK3288 系统:Android 5.1 如果硬件使用的wifi模块支持5G,则系统设置中打开wifi,除了会搜索到普通的2.4G信号,还会搜索到xxx_5G信号. 如果路由器开了5G信号, ...