wagoodman / dive

A tool for exploring each layer in a docker image
MIT License
46.2k stars 1.76k forks source link

dive slows to a crawl with large images #288

Open andrewzah opened 4 years ago

andrewzah commented 4 years ago

I'm trying to use dive to inspect a 6gb docker image, with one layer containing 5.3gb. Just hitting up/down has a delay, so it's painful to try to scroll through the current layer contents.

abitrolly commented 4 years ago

How many files are there?

zbynekwinkler commented 3 years ago

I am trying to run in on https://hub.docker.com/layers/robotika/subt-base/2021-03-20/images/sha256-9c7aabce93d4009ad7d8c8fc5df62df35103fc6f53c64d70c2afb4f3194cc5d3?context=explore and it takes several minutes just to show the UI.

abitrolly commented 3 years ago

@zwn can you check system memory usage by dive when you open the image?

zbynekwinkler commented 3 years ago

2GB virtual, 1.4GB resident

During opening the image the CPU usage is split between dive and dockerd - both using about 150%. When scrolling through the layers after the UI loads up, it briefly spikes the CPU where the arrow has been pressed and so far has nothing happened (by briefly I mean seconds not minutes).

abitrolly commented 3 years ago

When opening an image, dive (or dockerd) unpacks it, probably in /tmp. If /tmp is on tmpfs, it also uses system memory. That's why it is important to track system memory and swap usage.