GlusterFS PERFORMANCE TUNING
众所周知,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的更多相关文章
- Performance Tuning
本文译自Wikipedia的Performance tuning词条,原词条中的不少链接和扩展内容非常值得一读,翻译过程中暴露了个人工程学思想和英语水平的不足,翻译后的内容也失去很多准确性和丰富性,需 ...
- Spark SQL 之 Performance Tuning & Distributed SQL Engine
Spark SQL 之 Performance Tuning & Distributed SQL Engine 转载请注明出处:http://www.cnblogs.com/BYRans/ 缓 ...
- IBM HTTP Server Performance Tuning
IBM HTTP Server Performance Tuninghttp://publib.boulder.ibm.com/httpserv/ihsdiag/ihs_performance.htm ...
- 30 分钟快快乐乐学 SQL Performance Tuning
转自:http://www.cnblogs.com/WizardWu/archive/2008/10/27/1320055.html 有些程序员在撰写数据库应用程序时,常专注于 OOP 及各种 fra ...
- PostgreSQL Hardware Performance Tuning
Bruce Momjian POSTGRESQL is an object-relational database developed on the Internet by a group of de ...
- Performance Tuning guide 翻译 || 前言
CSDN 对格式支持比較弱,能够到http://user.qzone.qq.com/88285879/blog/1399382878 看一致的内容. 前言Preface 包含例如以下几个小节 l Au ...
- Performance Tuning guide 翻译 || Performance Tuning Guide 11G中新增特性
CSDN 对格式支持比較弱.能够到http://user.qzone.qq.com/88285879/blog/1399382878 看一致的内容. Performance Tuning Guide ...
- mysql优化---优化工具MySQL performance tuning primer script
MySQL performance tuning primer script一个简单好用的mysql优化工具,其实一个shell脚本 下载: $ wget http://www.day32.com/M ...
- 老李分享: Oracle Performance Tuning Overview 翻译下
1.2性能调优特性和工具 Effective data collection and analysis isessential for identifying and correcting perfo ...
随机推荐
- 几个你所不知道的技巧助你写出更优雅的vue.js代码
1. watch 与 computed 的巧妙结合 如上图,一个简单的列表页面. 你可能会这么做: created(){ this.fetchData() }, watch: { keyword(){ ...
- 正则表达式matcher.group()用法
本帖转自http://winter8.iteye.com/blog/1463244 group是针对()来说的,group(0)就是指的整个串,group(1) 指的是第一个括号里的东西,group( ...
- HDU 5499:SDOI
SDOI Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Sub ...
- ElasticSearch(三):ES单机版本基本操作之删除,修改,插入
1. 创建索引 1.1 直接创建索引 可以直接使用head插件创建索引,指定分片数和备份数即可.如下图: 1.2 创建结构化索引 上图创建的索引,点开索引信息,mapping是空的,表示该索引的字段并 ...
- Nolia 给CC添加过滤器
思路: 1.使用jqurey-tagput ,做得不好看,领导不满意 2.使用bootstrap select2这个控件, 思路: 1.添加css和js的文件 2.添加标签的时候,根据id拼接标签,a ...
- vue-meta
vue-meta插件的使用: https://github.com/declandewet/vue-meta
- JNI学习笔记_Java调用C —— Android中使用的方法
一.笔记 1.JNI(Java Native Interface),就是如何使用java去访问C/C++编写的那些库.若想深入了解JNI可以看官方文档jni.pdf.优秀博文:Android JNI知 ...
- oracle nodejs 访问
1. 下载node-oracle网址如下: https://github.com/joeferner/node-oracle 2. 测试代码: var oracle = require('oracle ...
- Swift 学习笔记十五:扩展
扩展就是向一个已有的类.结构体或枚举类型加入新功能(functionality).扩展和 Objective-C 中的分类(categories)相似.(只是与Objective-C不同的是,Swif ...
- 前端基础之CSS快速入门
前一篇写了我们的Html的常用组件,当然那些组件在我们不去写样式的时候都是使用的浏览器的默认样式,可以说是非常之丑到爆炸了,我们肯定是不能让用户去看这样丑到爆炸的样式,所以我们在这里需要使用css样式 ...