Target Disk Fragmentation

Software-based VM-centric and flash-friendly VM storage + free version

Moderators: anton (staff), art (staff), Max (staff), Anatoly (staff)

Brandon
Posts: 14
Joined: Tue Jun 21, 2005 4:15 pm
Location: Olympia, WA - USA

Tue Aug 09, 2005 3:11 pm

I'm experiencing a pretty severe issue with fragmentation during large/long file copies from an initiator.

Scenario:
Target System - Starwind 2.6.3
3.6TB RAID5 - (11) 400GB - 3ware 9500S-12
1.5TB Sparse Image

Initiator System - MS Initiator 1.06
Copying from external 250GB HDDs through the iSCSI connection to the 1.5TB volume.
The copy starts fine but gradually slows down and eventually stops all together.

The target array fragments severely as the file copy progresses. It appears to be a file system issue on the target but I would like to hear other people’s impressions.
I'm going to be trying different strip size and cluster sizes on the array.

Has anyone else experienced these types of issues?

Thanks,
Brandon
Brandon
Posts: 14
Joined: Tue Jun 21, 2005 4:15 pm
Location: Olympia, WA - USA

Tue Aug 09, 2005 5:20 pm

I should note that some colleagues have been testing a similar target setup but have been using WinTarget (String Bean) instead of StarWind.

They have reported very little fragmentation during long data writes to an image file on the array.
I have not witnessed every detail personally but it sounds like something software related during the data writes.

Any ideas?

Brandon
DJ_Datte
Posts: 35
Joined: Mon Jul 18, 2005 6:12 pm
Contact:

Tue Aug 09, 2005 5:58 pm

Hello!

I will have to sign this one too!

But, I have found a way around it, dont use sparse image. With your writing performace, you should be able to make a flat image in about a hour, and be done with it.

I've had similiar problems, with fragmentation running in thousands parts of a file, making performance become like using raided floppydrives :)

I belive its a windows issue tho, not a starwind issue. It might be correctable by starwind tho, if for example, when starwind knows a 100mb file is incomming, it will allocate all 100mb of the sparse file, before it begins the write to disk!

/Damir
User avatar
anton (staff)
Site Admin
Posts: 4010
Joined: Fri Jun 18, 2004 12:03 am
Location: British Virgin Islands
Contact:

Tue Aug 09, 2005 6:48 pm

Absolutely correct! StarWind can work with non-allocated images, other cannot. This (sparse files) leaves you with comparably free disk but you have a penalty of extra allocation write per every physical iSCSI write. Another thing - it's a good idea to have cluster size of 64KB+ on volume holding iSCSI image.
Regards,
Anton Kolomyeytsev

Chief Technology Officer & Chief Architect, StarWind Software

Image
Tim
Posts: 93
Joined: Mon Jul 18, 2005 7:27 pm

Wed Aug 10, 2005 3:41 pm

How do I create a multi-gigabyte zero filled image file?

Not sparse but fully allocated for maximum performance.
Val (staff)
Posts: 496
Joined: Tue Jun 29, 2004 8:38 pm

Wed Aug 10, 2005 4:26 pm

Tim wrote:How do I create a multi-gigabyte zero filled image file?

Not sparse but fully allocated for maximum performance.
Tim,

You could use our mksparse.exe with '-o' parameter.

F.e. mksparse.exe -o file.img 1024G
Best regards,
Valeriy
Tim
Posts: 93
Joined: Mon Jul 18, 2005 7:27 pm

Wed Aug 10, 2005 5:00 pm

You could use our mksparse.exe with '-o' parameter.
Ah, so that's what the '-o' parameter means.
A quick look around didn't reveal any documentation for the mksparse program.

Thanks.
Val (staff)
Posts: 496
Joined: Tue Jun 29, 2004 8:38 pm

Wed Aug 10, 2005 5:08 pm

Tim wrote:
You could use our mksparse.exe with '-o' parameter.
Ah, so that's what the '-o' parameter means.
A quick look around didn't reveal any documentation for the mksparse program.

Thanks.
Just start the utility without parameters and you will see:
mksparse: Image file creation utility Version 1.1

Usage: mksparse [-o|-extend] <filename> size[k|M|G]

Examples:
mksparse file.img 10M -- create a new 10MB image (sparse file)
mksparse -o file.img 10M -- create a new 10MB image (flat file)
mksparse -extend c:\temp\image.dat 100M -- extend an existing image by 100MB

Note: size will be aligned on sector boundary.
Best regards,
Valeriy
Brandon
Posts: 14
Joined: Tue Jun 21, 2005 4:15 pm
Location: Olympia, WA - USA

Wed Aug 10, 2005 8:08 pm

DJ_Datte:

Thanks for the suggestion. The flat file fixed the problem.
I wrote 300GB of data and there was practically no fragmentation on the target. I made sure to defrag the empty flat file prior to writing any data.

Brandon,
DJ_Datte
Posts: 35
Joined: Mon Jul 18, 2005 6:12 pm
Contact:

Wed Aug 10, 2005 8:37 pm

Brandon:

You are welcome :) Dont forget that you can also defragment the actual drive on the initiator too from time to time, just like a normal drive =).

Hey, I got a question for you. When you defragmented, did you also notice that windows writes a part of the file on the start of the disk, then makes a gap thats about 20% of the capacity, then continues writing the file, so there is no way making so you dont have the flat image atleast in 2 parts (which isnt bad, just interesting ntfs behaviour).

/Damir
Tim
Posts: 93
Joined: Mon Jul 18, 2005 7:27 pm

Wed Aug 10, 2005 9:04 pm

Hey, I got a question for you. When you defragmented, did you also notice that windows writes a part of the file on the start of the disk, then makes a gap thats about 20% of the capacity, then continues writing the file, so there is no way making so you dont have the flat image atleast in 2 parts (which isnt bad, just interesting ntfs behaviour).
That'll be the MFT getting in the way. It normally sits near the start of the partition.
If you are only using the drive for large image file(s) then you can recover some space from the MFT (can't remember how ATM).
You only need a 'normal' size MFT when you there are lots of files in the filesystem.
DJ_Datte
Posts: 35
Joined: Mon Jul 18, 2005 6:12 pm
Contact:

Wed Aug 10, 2005 9:31 pm

Uhm, a 200GB MFT ? :P

/Damir
Tim
Posts: 93
Joined: Mon Jul 18, 2005 7:27 pm

Wed Aug 10, 2005 10:06 pm

Uhm, a 200GB MFT ?
Maybe, depends on the total partition size.


Standard MFT size is 12.5% of total free space when formatted.
There is a registry option to change this to 25%, 37.5 or 50%.
User avatar
anton (staff)
Site Admin
Posts: 4010
Joined: Fri Jun 18, 2004 12:03 am
Location: British Virgin Islands
Contact:

Thu Aug 11, 2005 7:56 am

Just a hint: use raw volumes w/o file system at all. Would save some place and could avoid "piggybacks" with growing cache size on server machine.
Tim wrote:
Uhm, a 200GB MFT ?
Maybe, depends on the total partition size.


Standard MFT size is 12.5% of total free space when formatted.
There is a registry option to change this to 25%, 37.5 or 50%.
Regards,
Anton Kolomyeytsev

Chief Technology Officer & Chief Architect, StarWind Software

Image
DJ_Datte
Posts: 35
Joined: Mon Jul 18, 2005 6:12 pm
Contact:

Thu Aug 11, 2005 8:26 am

I've tried raw volumes.. But do they work with the IBV plugin ? As I understand it, they dont ? Or am I wrong ?

/Damir
Locked