Chinaunix首页 | 论坛 | 博客
  • 博客访问: 58889
  • 博文数量: 44
  • 博客积分: 1245
  • 博客等级: 中尉
  • 技术积分: 255
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-08 10:41
文章分类

全部博文(44)

文章存档

2013年(1)

2012年(5)

2011年(38)

我的朋友

分类: 虚拟化

2012-02-03 17:18:41

Well, there is probably quite a lot I don't know about VMFS sub-blocks to be honest, but I recently learnt something new about sub-blocks on VMFS which I thought I already understood, but clearly didn't.

Sub-blocks are small allocations on a VMFS volume, and they are used to back small files. This saves space as you do not have to use a full file block to back a very small file (and on VMFS-3, this file block could be as large as 8MB).

Lets ignore the fact that VMFS-5 has a new small file support mechanism now (you can read all about this here). My incorrect understanding was that sub-blocks were used to back files on a VMFS until that file reached the 1MB limit. So for a file of say 512KB, you might use 8 sub-blocks on a VMFS-3, each sub-block being 64KB. I then thought that when the file reach this 1MB limit, it was then switched to being backed by actual file blocks.This is not the case.

In fact, what happens is that only a single sub-block is used to back a small file on VMFS and when the file size grows to be greater than 1 sub-block (64K on VMFS-3 & 8K on VMFS-5) then the file is flipped to being backed by actual file blocks.

This explains why, when listing file attributes on a VMFS-3 volume, you only ever see it as 64K in size, or a multiple of the file block size.

One of the cool things in VMFS-5 is that there are now a lot more sub-blocks. One issue we had in the past was that when the sub-block pool was exhausted, VMFS had to back very small files with actual file blocks. So if you had a lot of small files on the volume, you could end up with a lot of stranded space because actual file blocks were backing tiny files. This should be alleviated in VMFS-5 as there are now 4 times as many sub-blocks compared to VMFS-3 (130,000 vs. 30,000)

And just as a final clarification, these are for only backing small files that exist on a VMFS datastore. Sub-blocks are not used for backing files which reside inside a Guest OS. The Guest OS runs on a VMDK, which will be backed completely by file blocks because its size will (most very likely) always be greater than 1MB.

Get notification of these blogs postings and more VMware Storage infor

阅读(518) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~