这是一个非常古老的 octave 安装,3.05,但它是 centos-5 的标准配置,在许多生产环境中仍然存在。当我 strace octave 时,我看到它不断地在同一个文件上调用 stat 。它必须花费一半的时间来说明相同的文件。这是一个示例:
stat("/usr/local/share/octave/3.0.5/m/path", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 stat("/usr/local/share/octave/3.0.5/m/plot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 stat("/usr/local/share/octave/3.0.5/m/pkg", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 stat("/usr/local/share/octave/3.0.5/m/sparse", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 stat("/usr/local/share/octave/3.0.5/m/control", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 stat("/usr/local/share/octave/3.0.5/m/control/obsolete", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 stat("/usr/local/share/octave/3.0.5/m/control/hinf", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
这并没有真正给出完整的味道,因为它一遍又一遍地更多和相同的。它发生在突发事件中。为什么要这样做,我怎样才能让它停止?或者至少让它做一次而不是经常做。