tar正在读取的数据不需要存在于文件系统缓存中.它进入tarfile就是这样.有什么东西我们可以说像tar cvf无论/ –no-system-file-buffer-reads?我对男人tar的阅读并没有出现任何看起来会有所帮助的东西.
你不必指出这可以被视为“Doc,当我这样做时会很痛!所以不要那样”的情况.不知何故,我们需要将文件转储到tar文件中,所以不是那样的选择.
解决方法
There is the 07001 utility,which can prepended to a command like
ionice and nice. It works by preloading a library which adds
posix_fadvise
with thePOSIX_FADV_DONTNEED
flag to any open calls.In simple terms,it advises the kernel that caching is not needed for
that particular file; the kernel will then normally not cache the
file. See 07002 for the technical details.It does wonders for any huge copy jobs,e. g. if you want to backup a
multi terabyte disk in the background with the least possible impact
on you running system,you can do something alongnice -n19 ionice -c3 nocache cp -a /vol /vol2
.