Skip to contentSkip to conversation

Why ocfs2 haven't implemented "steal" for local_alloc system files?

Ocfs2-devel Younger Liu 4 participants 7 messages Jul 27, 2013 – Aug 2, 2013 OCFS2

lore
Share & tools
lore
#0 lore raw

Hi,
While analyzing ocfs2 block allocation, I found:
When claiming space from inode_alloc (or extent_alloc) system files,
if there is no enough space in inode_alloc (or extent_alloc) and global_bitmap, it could steal space from other slots.
But when claiming space from local_alloc system files, and no
enough space in local_alloc and global_bitmap, it returns -ENOSPC.

Why ocfs2 haven't implemented "steal" for local_alloc system files? Is there any some reasons?

#1 lore raw

Because it makes no sense. Unlike inode/extent allocs, local_alloc is a temporary cache. If you fail to allocate, you fallback to the global bitmap.

Quoted 8 lines · Younger Liu

Hi,
While analyzing ocfs2 block allocation, I found:
When claiming space from inode_alloc (or extent_alloc) system files,
if there is no enough space in inode_alloc (or extent_alloc) and global_bitmap, it could steal space from other slots.
But when claiming space from local_alloc system files, and no
enough space in local_alloc and global_bitmap, it returns -ENOSPC.

Quoted 9 lines

Why ocfs2 haven't implemented "steal" for local_alloc system files? Is there any some reasons?

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20130731/e1a999fb/attachment.html

maintainer
#2 lore raw

Basically, there's so little in the cache that stealing would be too complex. Really we just want to fall back to the global, and if that is empty, you're near enough ENOSPC that it doesn't much matter.

Joel

Quoted 28 lines · Sunil Mushran

Because it makes no sense. Unlike inode/extent allocs, local_alloc is a temporary cache. If you fail to allocate, you fallback to the global bitmap.

Quoted 8 lines · Younger Liu

Hi,
While analyzing ocfs2 block allocation, I found:
When claiming space from inode_alloc (or extent_alloc) system files,
if there is no enough space in inode_alloc (or extent_alloc) and global_bitmap, it could steal space from other slots.
But when claiming space from local_alloc system files, and no
enough space in local_alloc and global_bitmap, it returns -ENOSPC.

Quoted 9 lines

Why ocfs2 haven't implemented "steal" for local_alloc system files? Is there any some reasons?

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

Signature · 7 lines
"Born under a bad sign.
 I been down since I began to crawl.
 If it wasn't for bad luck,
 I wouldn't have no luck at all."

			http://www.jlbec.org/
			jlbec at evilplan.org
#3 lore raw
Quoted 6 lines · Joel Becker

Basically, there's so little in the cache that stealing would be too complex. Really we just want to fall back to the global, and if that is empty, you're near enough ENOSPC that it doesn't much matter.

Joel

Localalloc is a mount option. When mounting an ocfs2 volume, localalloc can be set a larger size. For example, 2G or a larger number.

In a multi-nodes cluster, all nodes mount ocfs2 volume with localalloc=2048 for performance consideration, if a node claims space for a file, but there is no space in the local_alloc and global_bitmap. It would return ENOSPC. However, other nodes may have lots of space which have been claimed in local_alloc, so ENOSPC cannot reflect the actual situation.

IMO, if there is no space both in the local_alloc and global_bitmap, it should steal space from other nodes local_alloc.

Thx,
Younger.

Quoted 31 lines · Sunil Mushran
Quoted 28 lines

Because it makes no sense. Unlike inode/extent allocs, local_alloc is a temporary cache. If you fail to allocate, you fallback to the global bitmap.

Quoted 8 lines · Younger Liu

Hi,
While analyzing ocfs2 block allocation, I found:
When claiming space from inode_alloc (or extent_alloc) system files,
if there is no enough space in inode_alloc (or extent_alloc) and global_bitmap, it could steal space from other slots.
But when claiming space from local_alloc system files, and no
enough space in local_alloc and global_bitmap, it returns -ENOSPC.

Quoted 9 lines

Why ocfs2 haven't implemented "steal" for local_alloc system files? Is there any some reasons?

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

#4 lore raw

The complexity is not worth it. 2G*16 nodes is only 32G. That's rounding error in systems that use this file system. And you are assuming that all other nodes have all 2G in their cache. If a node runs out of space, a more realistic scenario is that most other nodes are also close to the end.

Quoted 22 lines · Younger Liu
Quoted 6 lines · Joel Becker

Basically, there's so little in the cache that stealing would be too complex. Really we just want to fall back to the global, and if that is empty, you're near enough ENOSPC that it doesn't much matter.

Joel

Localalloc is a mount option. When mounting an ocfs2 volume, localalloc can be set a larger size. For example, 2G or a larger number.

In a multi-nodes cluster, all nodes mount ocfs2 volume with localalloc=2048 for performance consideration, if a node claims space for a file, but there is no space in the local_alloc and global_bitmap. It would return ENOSPC. However, other nodes may have lots of space which have been claimed in local_alloc, so ENOSPC cannot reflect the actual situation.

IMO, if there is no space both in the local_alloc and global_bitmap, it should steal space from other nodes local_alloc.

Thx,
Younger.

Quoted 36 lines
Quoted 3 lines · Sunil Mushran
Quoted 2 lines

Because it makes no sense. Unlike inode/extent allocs, local_alloc is a temporary cache. If you fail to allocate, you fallback to the global

bitmap.

Quoted 3 lines
Quoted 3 lines

On Sat, Jul 27, 2013 at 3:27 AM, Younger Liu <[email protected]>

Quoted 25 lines · wrote:
Quoted 23 lines
Quoted 9 lines

Hi,
While analyzing ocfs2 block allocation, I found:
When claiming space from inode_alloc (or extent_alloc) system files,
if there is no enough space in inode_alloc (or extent_alloc) and global_bitmap, it could steal space from other slots.
But when claiming space from local_alloc system files, and no
enough space in local_alloc and global_bitmap, it returns -ENOSPC.

Quoted 9 lines

Why ocfs2 haven't implemented "steal" for local_alloc system files? Is there any some reasons?

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20130801/7dde9694/attachment.html

#5 lore raw
In reply to Younger Liu
Quoted 11 lines · Younger Liu
Quoted 6 lines · Joel Becker

Basically, there's so little in the cache that stealing would be too complex. Really we just want to fall back to the global, and if that is empty, you're near enough ENOSPC that it doesn't much matter.

Joel

Localalloc is a mount option. When mounting an ocfs2 volume, localalloc can be set a larger size. For example, 2G or a larger number.

In a multi-nodes cluster, all nodes mount ocfs2 volume with localalloc=2048

Is there a proof that localalloc=2048 performs better than default 256Mb ? local alloc currently looks for contiguous chunks. setting it to 2gb means it has to scan the whole bitmap to find that big of a chunk which in itself defeats the purpose of setting it to 2gb. I mean it might work well for a filesystem that just got formatted but as it gets used finding 2gb chunks is hard.

Quoted 46 lines

for performance consideration, if a node claims space for a file, but there is no space in the local_alloc and global_bitmap. It would return ENOSPC. However, other nodes may have lots of space which have been claimed in local_alloc, so ENOSPC cannot reflect the actual situation.

IMO, if there is no space both in the local_alloc and global_bitmap, it should steal space from other nodes local_alloc.

Thx,
Younger.

Quoted 24 lines · Sunil Mushran
Quoted 23 lines

Because it makes no sense. Unlike inode/extent allocs, local_alloc is a temporary cache. If you fail to allocate, you fallback to the global bitmap.

Quoted 17 lines · Younger Liu

Hi,
While analyzing ocfs2 block allocation, I found:
When claiming space from inode_alloc (or extent_alloc) system files,
if there is no enough space in inode_alloc (or extent_alloc) and global_bitmap, it could steal space from other slots.
But when claiming space from local_alloc system files, and no
enough space in local_alloc and global_bitmap, it returns -ENOSPC.

Why ocfs2 haven't implemented "steal" for local_alloc system files? Is there any some reasons?

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

Quoted 5 lines
Quoted 4 lines

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

#6 lore raw
Quoted 11 lines · Srinivas Eeda
Quoted 10 lines · Younger Liu
Quoted 6 lines · Joel Becker

Basically, there's so little in the cache that stealing would be too complex. Really we just want to fall back to the global, and if that is empty, you're near enough ENOSPC that it doesn't much matter.

Joel

Localalloc is a mount option. When mounting an ocfs2 volume, localalloc can be set a larger size. For example, 2G or a larger number.

Quoted 7 lines
Quoted 1 line

In a multi-nodes cluster, all nodes mount ocfs2 volume with localalloc=2048

Is there a proof that localalloc=2048 performs better than default 256Mb ? local alloc currently looks for contiguous chunks. setting it to 2gb means it has to scan the whole bitmap to find that big of a chunk which in itself defeats the purpose of setting it to 2gb. I mean it might work well for a filesystem that just got formatted but as it gets used finding 2gb chunks is hard.

yes, I have proved that localalloc=2048 performs better, it improves about 5%. In the scenario, ocfs2 volume stores virtual images which are very large, for example, 20G or 50G.

Quoted 55 lines
Quoted 43 lines

for performance consideration, if a node claims space for a file, but there is no space in the local_alloc and global_bitmap. It would return ENOSPC. However, other nodes may have lots of space which have been claimed in local_alloc, so ENOSPC cannot reflect the actual situation.

IMO, if there is no space both in the local_alloc and global_bitmap, it should steal space from other nodes local_alloc.

Thx,
Younger.

Quoted 24 lines · Sunil Mushran
Quoted 23 lines

Because it makes no sense. Unlike inode/extent allocs, local_alloc is a temporary cache. If you fail to allocate, you fallback to the global bitmap.

Quoted 17 lines · Younger Liu

Hi,
While analyzing ocfs2 block allocation, I found:
When claiming space from inode_alloc (or extent_alloc) system files,
if there is no enough space in inode_alloc (or extent_alloc) and global_bitmap, it could steal space from other slots.
But when claiming space from local_alloc system files, and no
enough space in local_alloc and global_bitmap, it returns -ENOSPC.

Why ocfs2 haven't implemented "steal" for local_alloc system files? Is there any some reasons?

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

Quoted 5 lines
Quoted 4 lines

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

Quoted 4 lines

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel