[Ocfs2-devel] Performance issue about localalloc
Joseph Qi
joseph.qi at huawei.com
Thu Sep 10 04:23:29 PDT 2015
Hi Mark,
I have encountered a performance issue about localalloc.
ocfs2 volume information:
block size = 4k, cluster size = 1M, mount option with localalloc=2048
So in the above circumstance, gd size is 32256M. Suppose I want to
create a normal file with size of 50G. Since the localalloc window is
2G, it will eventually allocate space like, 2Gfrom gd0, 2G from gd1,
..., and this will lead to poor performance because of the
dis-contiguous file with large span.
One way to resolve this issue is changing the mount option with
localalloc=31104, but this will make end user confused because 31G is
"missing" even he has only used 2M.
So I wander if we can let the allocation continues with the last gd if
it has enough space for a localalloc window. I have blamed the code
history and found that firstly you have already designed like this but
disabled in the commit "ocfs2: properly set and use inode group alloc
hint". I wander why?
A simply code hack is,
static u64 ocfs2_group_from_res(struct ocfs2_suballoc_result *res)
{
if (res->sr_blkno == 0)
return 0; // This will set the hint to 0
...
}
Am I missing something?
Thanks,
Joseph
More information about the Ocfs2-devel
mailing list