So I have a good number of files (based on current node count in the filesystem, 2498329) and when I try to make an .iso out of it, mkisofs runs out of memory, pushes the machine into swap and then runs out of that too. Is there something to make mkisofs less memory hungry? The reason I am creating an ISO because I would like to distribute these files but I can't just drop 2.5M files on people via an archive they extract onto existing filesystems (there would be serious risk of inode exhaustion for ext3, at least) so I thought ISO files are easy to mount on Linux, Windows, Mac OS X.

EDIT: tried --no-cache-inodes - it may or may not have helped, but memory usage still spiked back up past 1G during the initial scan.

  • How about a zip file or tar archive instead? Windows does not have native support for mounting ISOs, and 7z, which supports tar is a bit less intrusive than installing drivers for a virtual CDROM. – jordanm Feb 16 '13 at 17:59
  • @jordanm Windows 8 does have native support for mounting ISOs. And its child's play to mount ISOs on previous Windows versions using third party software. – nico_c Feb 16 '13 at 18:43
  • What's the total size of all files? mkisofs has the option -split-output (together with -o filename), which could split it to several files. – ott-- Feb 18 '13 at 17:06

Try the -no-cache-inodes option. The default is to cache inodes for hard link detection, but if there are none, this will save some memory.

| improve this answer | |

Do not use the -no-cache-inodes option.

Mkisofs is not very memory hungry. You may be a victim of a bad mkisofs variant that is based on code from 2004 and this is memory hungry. In 2006, many bugs in mkisofs have been fixed, so use a recent version.

I just tried and a recent mkisofs consumes approx. 400MB of memory for 630000 files when creating Rock Ridge and approx 80 MB without Rock Ridge. Your 2.5M files would need 1.6G of memory with Rock Ridge and less than 400M without. Is this too much for your machine?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.