Subject: Bug#726731: #726731: dump: Huge RAM usage on restore

From: Elliott Mitchell <[email-masked]>
Date: Thu, 29 Jun 2017 19:52:20 -0700

Perhaps there should be a caution about filesystems with large numbers
of i-nodes.  Notice the numbers provided are just under 330 bytes for
every i-node.

The current `restore` program no longer acts as the traditional 4.4BSD
`restore` did.  Instead of restoring a near-exact image of the filesystem
to a clean filesystem, it has to remap each file to a new i-node.  I
think this behavior is a *vast* improvement, but it means large numbers
of i-nodes result in large memory consumption during restore.

In order to perform this task, `restore` has to generate a huge table to
map old i-node numbers to new filenames.  330 bytes per i-node isn't too
bad as far as this goes.  Perhaps some optimization can be done, but with
this many i-nodes you're simply bumping into a problem of how small can a
hash-table or tree be yet still perform the needed function.

(geeze, memory and processor power are so cheap nowadays...)

-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         [email-masked]  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445