All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] Performance issue about localalloc
@ 2015-09-10 11:23 Joseph Qi
  2015-09-13 10:00 ` Joseph Qi
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph Qi @ 2015-09-10 11:23 UTC (permalink / raw)
  To: ocfs2-devel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-13 10:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-10 11:23 [Ocfs2-devel] Performance issue about localalloc Joseph Qi
2015-09-13 10:00 ` Joseph Qi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.