Red Hat Bugzilla – Bug 211355
[kexec-tools] Possible use of direct IO while copying the vmcore
Last modified: 2007-11-30 17:07:35 EST
Description of problem:
Can you use direct IO (option provided with dd) while copying the dump to local
disk. It would avoid caches and chances of OOM killer triggering during dump
copying operation are less.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
unfortunately, busybox cp and dd applets do not currently support the use of
O_DIRECT in thier operation. However it appears fairly simple to add support
for direct I/O to busybox. I'm opening a feature request on busybox to see if
we can get this in, and if so, we can fulfill this request.
Note to self: While the idea of adding direct I/O to some busybox utilities is a
good idea, it just occured to me that we may not need it to do what we want
here. If the goal is to avoid oom kills, we may be able to do this through
various vm tunings. for instance by setting the dirty_backround_ratio and
dirty_ratio very low, we can probably severely limit how much memory is used in
pagecache. There may also be a setting to exlicitly disable oom killing. I'll
look into these items in the AM.
Created attachment 138883 [details]
patch to restrict pagecache useage in initramfs
patch to tightly restrict pagecache filling in initramfs
vivek, could you please try this patch out? It tunes the vm sysctls to help
limit the amount of memory that can be used by pagecache. If it works well
enough, we may not need to use direct I/O to stem oom kills. Thanks
I'm closing this as CURRENTRELEASE, since I've already implemented this. If I
get the chance, I'll look into submitting a patch to busybox to enable directIO
on its dd applet.