On Mon, Jul 04, 2011 at 11:41:49AM +0200, Łukasz Korczyk wrote: > Helo > > I have a question I wasn't able to find answer for. > > Which factors influence memory usage of xfs_repair? > Does any formula exist to count possible memory usage? # xfs_repair -n -vv -m 1 /dev/vda Phase 1 - find and verify superblock... - max_mem = 1024, icount = 64, imem = 0, dblock = 4294967296, dmem = 2097152 Required memory for repair is greater that the maximum specified with the -m option. Please increase it to at least 2096. So it's telling me I need at least 2096MB of RAM to repair my 16TB filesystem, of which 2097152KB is needed for tracking free space... I just added 50 million inodes to the filesystem (it now has 50M + 10 inodes in it), and the result is: # xfs_repair -vv -m 1 /dev/vda Phase 1 - find and verify superblock... - max_mem = 1024, icount = 50401792, imem = 196882, dblock = 4294967296, dmem = 2097152 Required memory for repair is greater that the maximum specified with the -m option. Please increase it to at least 2289. That is now needs at least another 200MB of RAM to run. It is worth noting that these numbers are the absolute minimum required and repair may require more RAM than this to complete successfully. If you only give it this much RAM, it will be slow; for best repair performance, the more RAM you can give it the better. Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs