Skip to content

Instantly share code, notes, and snippets.

@pfactum
Created March 17, 2016 22:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pfactum/e8265ca07f7b19f30bb3 to your computer and use it in GitHub Desktop.
Save pfactum/e8265ca07f7b19f30bb3 to your computer and use it in GitHub Desktop.

Towards GlusterFS Arbiter Brick Size Estimation

Test 1

URL: https://gist.github.com/1b4129b6ed77b6c48da4

The script creates 1M of files of random size (between 1 and 32768 bytes) and some amount of folders. After running it I've got 1036637 folders. So, in total it is 2036637 files and folders.

The initial used space on each brick is 42M.

Inode size: 512

replica brick 1 and 2: 19867168 kbytes == 19G arbiter brick: 1872308 kbytes == 1.8G

The amount of inodes on each brick is 3139091. So here goes estimation.

Dividing arbiter used space by files+folders we get:

(1872308 - 42000)/2036637 == 899 bytes per file or folder

Dividing arbiter used space by inodes we get:

(1872308 - 42000)/3139091 == 583 bytes per inode

Test 2

URL: https://gist.github.com/2fc81e5ea08bae626e3a

  • 10 top-level folders with 10 second-level folders each;
  • 10 000 files in each second-level folder.

So, this composes 10×10×10000=1M files and 100 folders

Initial brick used space: 33 M Initial inodes count: 23 or 24

Inode size: 256

(597904 - 33000) / (1066036 - 23) == 530 bytes per inode.

Inode size: 512

(836 - 33) / (1066036 - 24) == 790 bytes per inode.

Inode size: 1024

(1171336 - 33000) / (1066036 - 23) == 1068 bytes per inode.

Conclusion

Given a good engineer should consider 30% reserve, the ratio is about 1k per stored inode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment