11

extX(X=2,3,4)等文件系统的数据盘也需要预留 5%的空间吗?

 3 years ago
source link: https://www.v2ex.com/t/797061
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  Linux

extX(X=2,3,4)等文件系统的数据盘也需要预留 5%的空间吗?

  zhoudaiyu · 14 小时 1 分钟前 · 312 次点击

看了一些说法,如serverfault里面说的预留是为了即便系统盘空间打满后,系统的一些关键进程还能跑,比如 ssh 什么的。但是数据盘有必要预留这么大吗?尤其是比如 7 个 T 的盘要少将近 350G 的磁盘空间,感觉很亏啊!难道这个预留空间还有什么别的用途?还有个问题想请教一下,就是可以通过一个命令( tune2fs -m 0 /dev/foo_bar )优化这个空间,这个命令对 I/O 量很大的磁盘会产生性能抖动吗?

4 条回复    2021-08-20 21:47:42 +08:00

heyjei

heyjei   13 小时 17 分钟前   ❤️ 1

>>> 引用 https://listman.redhat.com/archives/ext3-users/2009-January/msg00026.html
If you set the reserved block count to zero, it won't affect
performance much except if you run for long periods of time (with lots
of file creates and deletes) while the filesystem is almost full
(i.e., say above 95%), at which point you'll be subject to
fragmentation problems. Ext4's multi-block allocator is much more
fragmentation resistant, because it tries much harder to find
contiguous blocks, so even if you don't enable the other ext4
features, you'll see better results simply mounting an ext3 filesystem
using ext4 before the filesystem gets completely full.

If you are just using the filesystem for long-term archive, where
files aren't changing very often (i.e., a huge mp3 or video store), it
obviously won't matter.

privil

privil   13 小时 14 分钟前

这个命令对 I/O 量很大的磁盘会产生性能抖动吗? 应该是不会,只是标记一下可用块的数量而已。

zhoudaiyu

zhoudaiyu   13 小时 8 分钟前

@heyjei #1 太感谢了,看来是没啥事,大哥你是咋搜到的啊
@privil #2 感谢,看了 1 楼大哥的回答,看来是没什么影响

billlee

billlee   8 小时 28 分钟前

设定 5% 这个默认值的时候还没有这么大的硬盘,大硬盘上可以改成 1% 什么的

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK