我正在运行一个Linux软件突袭10的服务器。这是一个双CPU系统与64GB RAM。 与每个CPU相关的2x16GB调光器。 我想用dd来备份kvm虚拟机,并且遇到严重的io问题。 首先我认为是与raid有关,但这是linux内存pipe理的一个问题。 这里是一个例子:
有没有人有解决scheme或configuration提示? 这里也是我的sysctl,但所有的值都是centos默认值: http : //i.stack.imgur.com/ZQBNG.jpg
我做了另一个testing,而不是/ dev / null dd到磁盘。 这一次也在一个没有光伏的命令。 所以它只有一个过程。 dd if=/dev/vg_main_vms/AppServer_System of=AppServer_System bs=4M
sync; echo 3 > /proc/sys/vm/drop_caches sync; echo 3 > /proc/sys/vm/drop_caches 。 之后,同样的游戏再次启动… 对于本地DD,我可以用参数iflag = direct和oflag = direct解决。 但是这不是通用的解决scheme,因为还有其他的文件访问方式,比如将文件复制到vm的本地samba共享中,而且我不能使用这些参数。 必须调整系统文件caching规则,因为不能正常复制大文件而没有这些问题。
只是一个疯狂的猜测。 你的问题可能是大的脏页面冲洗。 尝试设置/etc/sysctl.conf,如下所示:
# vm.dirty_background_ratio contains 10, which is a percentage of total system memory, the # number of pages at which the pdflush background writeback daemon will start writing out # dirty data. However, for fast RAID based disk system this may cause large flushes of dirty # memory pages. If you increase this value from 10 to 20 (a large value) will result into # less frequent flushes: vm.dirty_background_ratio = 1 # The value 40 is a percentage of total system memory, the number of pages at which a process # which is generating disk writes will itself start writing out dirty data. This is nothing # but the ratio at which dirty pages created by application disk writes will be flushed out # to disk. A value of 40 mean that data will be written into system memory until the file # system cache has a size of 40% of the server's RAM. So if you've 12GB ram, data will be # written into system memory until the file system cache has a size of 4.8G. You change the # dirty ratio as follows: vm.dirty_ratio = 1
然后执行sysctl -p重新加载,再次删除caching( echo 3 > /proc/sys/vm/drop_caches )。