我的软件RAID可以写800 MB / s持续.我看到当cat / proc / meminfo | grep回写:返回> 2 GB.但是,大多数情况下,回写是0.5 GB的圆形,其性能大约为200 MB / s.
有很多数据要写. cat / proc / meminfo | grep脏:说脏缓存是90 GB.
据我所知,Dirty是需要编写的内容,而Writeback是主动写入磁盘的内容.因此,Dirty中可能存在块,这些块位于Writeback中块旁边的磁盘上,并且这些块不会写在同一个go中.
这可以解释为什么如果Writeback很小,我的性能会更差,因为花费的时间要花费更多的时间来写一些额外的MB.
所以我的问题是:我可以以某种方式告诉内核将更多数据从Dirty转移到Writeback更积极地从而增加Writeback吗?
– 编辑 –
这是在低性能期间:
$cat /proc/meminfo
MemTotal: 264656352 kB
MemFree: 897080 kB
Buffers: 72 kB
Cached: 233751012 kB
SwapCached: 0 kB
Active: 3825364 kB
Inactive: 230327200 kB
Active(anon): 358120 kB
Inactive(anon): 47536 kB
Active(file): 3467244 kB
Inactive(file): 230279664 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 204799996 kB
SwapFree: 204799996 kB
Dirty: 109921912 kB
Writeback: 391452 kB
AnonPages: 404748 kB
Mapped: 12428 kB
Shmem: 956 kB
Slab: 21974168 kB
SReclaimable: 21206844 kB
SUnreclaim: 767324 kB
KernelStack: 5248 kB
PageTables: 7152 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 337128172 kB
Committed_AS: 555272 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 544436 kB
VmallocChunk: 34124336300 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 149988 kB
DirectMap2M: 17649664 kB
DirectMap1G: 250609664 kB
cat /proc/sys/vm/dirty_background_ratio
1
降低dirty_writeback_centisecs只会在更小的位中删除脏.