• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubevirt / containerized-data-importer / #4608
49%

Build:
DEFAULT BRANCH: main
Ran 16 May 2024 12:28AM UTC
Jobs 1
Files 92
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 May 2024 12:22AM UTC coverage: 61.097% (+0.4%) from 60.719%
#4608

push

travis-ci

web-flow
Use direct io with qemu-img convert if pod is OOMKilled (#3017)

* Use direct io with qemu-img convert if target supports it

For a while now we have been switching between cache=none (direct io) and cache=writeback (page cache)
for qemu-img's writes.

We have settled on cache=writeback for quite some time since https://github.com/kubevirt/containerized-data-importer/pull/1919,
however, this has proven to be problematic;
Our pod's live in a constrained memory environment (default limit 600M).
cgroupsv1 compares utilization of page cache vs the host's dirty_ratio.
This means that on a standard system (30% dirty ratio) pages only get forced to disk at 0.3 * HOST_MEM (basically never),
easily triggering OOM on hosts with lots of free memory.

cgroupsv2 does come to the rescue here:
- It considers dirty_ratio against CGROUP_MEM
- Has a new memory.high knob that throttles instead of OOM killing
Sadly, k8s is yet to capitalize on memory.high since this feature is still alpha:
https://kubernetes.io/blog/2023/05/05/qos-memory-resources/
Leaving us with no way to avoid frequent OOMs.

This commit changes the way we write to bypass page cache if the target supports it,
otherwise, fall back to cache=writeback (use page cache).
There have previously been issues where target did not support O_DIRECT. A quick example is tmpfs (ram-based)

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>

* Capitalize on cache mode=trynone if importer is being OOMKilled

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>

---------

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>

95 of 118 new or added lines in 6 files covered. (80.51%)

13486 of 22073 relevant lines covered (61.1%)

0.68 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #4608.1 16 May 2024 12:28AM UTC 0
61.1
Source Files on build #4608
Detailed source file information is not available for this build.
  • Back to Repo
  • 74e25525 on github
  • Prev Build on main
  • Next Build on main
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc