When an IO from host of size 4k and 512bytes comes to VSP, how its written to the VSP disk
Here's the longer explanation.
Please read carefully.
Consider a 1 TB LDEV mapped to a server. When you create lets say a NTFS filesystem on this 1 TB LDEV, the server sees the filesystem as a sequence of lets say 4k blocks with Logical Block Addresses or LBA. Now on the HDP Pool when you created the filesystem address blocks are assigned to 42 MB pages but no space is actually consumed.
Scenario 1 :- Lets say you created a 20 MB file. Then a 42 MB page is allocated on the HDP Pool and this 20 MB file stored there. Now what happens to the unused 22 MB. ? Lets say you now create a 100 MB file. If the server decides to pick from the same LBA sequence where it left off for the 20 MB file then 22 MB will be written to the first 42 MB page and another two 42 MB pages will be allocated with 42 MB written to the second 42 MB chunk and 36 MB to the third 42 MB chunk and so on.
This scenario covers the use case where the server uses up LBA's in a sequential fashion.
Scenario 2 :- Now lets take your question as I understand it. The server creates a 4k file and then a 512k file or the server updates a 4k block and a 512k block. Lets assume for a minute that there is no cache involved here. If the LBA's to which the server writes are in sequence then both writes will go to a single 42 MB page. But if the LBA's are not in sequence it is possible depending on the LBA range that two 42 MB pages maybe allocated. But the unused space in the 42 MB chunks can be used up whenever the corresponding LBAs are written to or the unused capacity can be reclaimed when you run ZPR. If you take the caching algorithms into consideration then the HDS VSP tends to keep writes in cache and destages periodically to disk in such a way that as far as possible the LBA's to which the destage happens are in sequence.
It is written to cache first and then a deferred destage is performed to disk
Yes true.But as per my understanding when an IO comes to VSP, it allocates a 42 MB page.Now I want to know whether for 4k IO VSP allocates a full 42 MB page and after writing 4K to it , rest of the space remains empty and for 512bytes IO a different page is allocated.I am not sure about this.Need a clear picture how the data is written.
4k and 512 byte IO's are accumulated in cache and a deferred destage is performed to the 42 MB pages that form a HDP Pool.
The keyword here is deferred i.e it is not immediately written.
But before writing to cache 4k and 512 bytes, should the 42 MB page already be have loaded to the cache?
I supposed that, if page was not already in the cache, a cache miss event is triggered and page is loaded from disks. After that, new data can be written in the block in cache.
Am I wrong?
Thanks Vinod for your elaborated response.It really cleared my understanding.
Retrieving data ...