Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Aug 2005 14:02:01 +0400 (MSD)
From:      Dmitry Morozovsky <marck@rinet.ru>
To:        freebsd-hackers@FreeBSD.org
Subject:   ffs_alloc.c: minfree Q
Message-ID:  <20050810135713.K18426@woozle.rinet.ru>

next in thread | raw e-mail | index | archive | help
Colleagues,


from ffs_alloc.c:

        case FS_OPTSPACE:
                /*
                 * Allocate an exact sized fragment. Although this makes
                 * best use of space, we will waste time relocating it if
                 * the file continues to grow. If the fragmentation is
                 * less than half of the minimum free reserve, we choose
                 * to begin optimizing for time.
                 */
                request = nsize;
                if (fs->fs_minfree <= 5 ||
   --->>>        ~~~~~~~~~~~~~~~~~~~~~~
                    fs->fs_cstotal.cs_nffree >
                    (off_t)fs->fs_dsize * fs->fs_minfree / (2 * 100))
                        break;
                log(LOG_NOTICE, "%s: optimization changed from SPACE to TIME\n",
                        fs->fs_fsmnt);
                fs->fs_optim = FS_OPTTIME;
                break;

For contemporary situation, where total size of file system can grow to 
hundreds of Gs or even several Ts, 8% of space seems too high. 

Maybe this algorithm should be slightly adjusted (I'm thinking of logarithmic 
scale depending on file system size)? 

Any (contemporary) references would be highly appreciated.


Sincerely,
D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
------------------------------------------------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050810135713.K18426>