I'd really like to discourage doing this, as it may end up just as disruptive. You'll essentially now force a whole lot more IO, which may well (depending on your setup) end up contending with mysql for IO which would be just as bad. If you really must, make wrappers for cp/find/etc in a separate directory and stuff it first in PATH for the vendor script(s) execution environment. I.e. mkdir /opt/evil echo -en "#! /bin/bash\nexec nocache /bin/cp \"\${@}\"\n" >/opt/evil/cp chmod a+x /opt/evil/cp # repeat for find and any other things you want to be run with nocache export PATH=/opt/evil:${PATH} vendor-script.shAdditionally - if you use InnoDB, IIRC it does it's own in-process caching and does not rely (as heavily) on the linux pagecache. (责任编辑:) |