Re: 請問根目錄為什麼不用soft-updates?
※ 引述《eyeeye.bbs@wretch.twbbs.org (eye)》之銘言:
> 看書上寫說BSD預設是soft-updates+noasync...
> 下mount去看其他掛載點都是(ufs, local, soft-updates)
> 只有/是(ufs, local)
> 請問是為什麼呢?
# man tuning
--snip--
tunefs(8) may be used to further tune a file system. This command can be
run in single-user mode without having to reformat the file system. How-
ever, this is possibly the most abused program in the system. Many peo-
ple attempt to increase available file system space by setting the min-
free percentage to 0. This can lead to severe file system fragmentation
and we do not recommend that you do this. Really the only tunefs(8)
option worthwhile here is turning on softupdates with ``tunefs -n enable
/filesystem''. (Note: in FreeBSD 4.5 and later, softupdates can be
turned on using the -U option to newfs(8), and sysinstall(8) will typi-
cally enable softupdates automatically for non-root file systems). Soft-
updates drastically improves meta-data performance, mainly file creation
and deletion. We recommend enabling softupdates on most file systems;
however, there are two limitations to softupdates that you should be
aware of when determining whether to use it on a file system. First,
softupdates guarantees file system consistency in the case of a crash but
could very easily be several seconds (even a minute!) behind on pending
write to the physical disk. If you crash you may lose more work than
otherwise. Secondly, softupdates delays the freeing of file system
blocks. If you have a file system (such as the root file system) which
is close to full, doing a major update of it, e.g. ``make installworld'',
can run it out of space and cause the update to fail. For this reason,
softupdates will not be enabled on the root file system during a typical
install. There is no loss of performance since the root file system is
rarely written to.
--snip--
By Dan Nelson (dnelson@emsphone.com)
The 2 drawbacks with SU are
1 - You can't immediately reuse the space occupied by a file you just
deleted; this may bite you if you do an installworld and don't have
20MB free on /. when it comes to installing /sbin, you need 18MB
for the new binaries, but you can't reuse the 18MB for the
just-deleted binaries.
2 - If you create a file, SU doesn't commit it immediately; it waits a
bit. If you edit rc.conf and crash (or reboot by power-cycling),
you may find you don't have an rc.conf.
--
※ Origin: Yahoo!奇摩 大摩域 <telnet://bbs.kimo.com.tw>
◆ From: 61-224-73-16.dynamic.hinet.net
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):
FreeBSD 近期熱門文章
PTT數位生活區 即時熱門文章