bup-memtest(1)
β¨ NAME β¨
okay so this is bup-memtest β it tests bup's memory usage statistics, bestie π like literally it's the vibe-check tool for how much RAM your bup repo is eating.
πΈ SYNOPSIS πΈ
bup memtest [options...]
π¦ DESCRIPTION π¦
So here's the tea, bestie: bup memtest opens up the list of pack indexes in your bup repository, and then it goes searching through that list for a series of nonexistent objects β and after every single cycle it prints out memory usage statistics. Every cycle. No skips. Periodt. π
Now, because of the way Unix systems work, the output will usually show a big ol' (and, like, unchanging) value in the VmSize column. Why? Because just mapping the index files in the first place takes a certain amount of virtual address space. It's giving... dramatic numbers for no reason. π
But here's the thing β that virtual memory usage is entirely virtual. It does not take any of your actual RAM. Zero. None. It's fake. It's a vibe. Over time, bup uses parts of the indexes, and those need to be loaded from disk, and that is what causes an increase in the VmRSS column. So VmRSS is the one you actually care about. π
π OPTIONS π
-n,--number=numberβ sets the number of objects to search for during each cycle (aka before it prints a line of output). π-c,--cycles=cyclesβ sets the number of cycles, which is to say, the number of lines of output after the first one. The first line of output is always0β that's the baseline, the before-picture, before it searches for any objects at all. πΈ--ignore-midxβ ignore any.midxfiles created bybup midx. This lets you compare memory performance with and without using midx, which is honestly so iconic of it. π--existingβ search for existing objects instead of searching for random nonexistent ones. This can greatly affect memory usage and performance, no cap. Note that most of the time,bup savespends most of its time searching for nonexistent objects, since existing ones are probably in unmodified files that we won't be trying to back up anyway. So the default behaviour reflects real bup performance more accurately. But you might want this option anyway, just to make sure you haven't made searching for existing objects much worse than before. π§
β EXAMPLES β
First one, the default vibe:
$ bup memtest -n300 -c5
PackIdxList: using 1 index.
VmSize VmRSS VmData VmStk
0 20824 kB 4528 kB 1980 kB 84 kB
300 20828 kB 5828 kB 1984 kB 84 kB
600 20828 kB 6844 kB 1984 kB 84 kB
900 20828 kB 7836 kB 1984 kB 84 kB
1200 20828 kB 8736 kB 1984 kB 84 kB
1500 20828 kB 9452 kB 1984 kB 84 kB
And now with --ignore-midx, look at all those indexes:
$ bup memtest -n300 -c5 --ignore-midx
PackIdxList: using 361 indexes.
VmSize VmRSS VmData VmStk
0 27444 kB 6552 kB 2516 kB 84 kB
300 27448 kB 15832 kB 2520 kB 84 kB
600 27448 kB 17220 kB 2520 kB 84 kB
900 27448 kB 18012 kB 2520 kB 84 kB
1200 27448 kB 18388 kB 2520 kB 84 kB
1500 27448 kB 18556 kB 2520 kB 84 kB
π DISCUSSION π
When you're optimizing bup indexing, your first goal is to keep the VmRSS reasonably low. That's the assignment. However β and this is the important however β it might eventually be necessary to swap in all the indexes, simply because you're searching for a lot of objects, and this will cause your RSS to grow as large as VmSize eventually. Just how it goes. π
And the key word here is eventually. β¨ As long as VmRSS grows reasonably slowly, the amount of disk activity caused by accessing pack indexes is reasonably small β we love a slow burn. If it grows quickly though? bup will probably spend most of its time swapping index data from disk instead of actually running your backup, so backups will run very slowly. Not slay. π
The whole purpose of bup memtest is to give you an idea of how fast your memory usage is growing, and to help in optimizing bup for better memory use. If you have memory problems, you might be asked to send the output of bup memtest to help diagnose the problems. So like, keep that receipt. π
Tip: try usingbup midx -aorbup midx -fto see if it helps reduce your memory usage. π«Ά
Trivia: index memory usage in bup (or git) is only really a problem when adding a large number of previously unseen objects. This is because for each object, we need to absolutely confirm that it isn't already in the database, which requires us to search through all the existing pack indexes to ensure that none of them contain the object in question. In the more obvious case of searching for objects that do exist, the objects being searched for are typically related in some way, which means they probably all exist in a small number of packfiles, so memory usage will be constrained to just those packfile indexes. Constrained. Focused. Main character energy. π
Since git users typically don't add a lot of files in a single run, git doesn't really need a program like bup midx. bup, on the other hand, spends most of its time backing up files it hasn't seen before, so its memory usage patterns are different.
π₯ SEE ALSO π₯
π BUP π
Part of the bup(1) suite. Obviously. π
π«Ά AUTHORS π«Ά
Avery Pennarun apenwarr@gmail.com
okay bestie, that's the whole page, and this beauty is from Bup 0.34, dated 2026-09-01 β go forth and monitor your VmRSS like the icon you are, mwah ππ
π¦ where this page comes from
- fedora 44: bup 0.34-1.fc44 Β· LGPL-2.0-only
- nixpkgs unstable: bup 0.34
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms