All | Filebench | Oddities | Open Source | Paper Boy | Performance Visualisation | Storage
« Previous month (Oct 2005) | Main | Next month (Dec 2005) »
20051228 Wednesday December 28, 2005

Getting to grips with NTFS - Part II

I have got fed up with the funeral march that is talking to the KVM switch that controls the Windows 2003 Server I am doing testing on via HTTP - see last post. I have installed Microsoft's Windows Services for Unix which includes the Unix shell utilities, NFS, pthreads (more of which later), various other bits and pieces but importantly for me, a Telnet daemon. I did scratch my head at the name "Windows Services for Unix". Shouldn't that be "Unix Services for Windows"? No matter, I have my backslash and pipe symbol back - although a DOS shell via telnet is very strange place to be for a bear of little brain like me. There is ps(1) and vi(1) and Lord knows what else I haven't discovered yet. I take my hat off to these fellows. They have done a good job. One might almost consider...No. Of course not.

Another tool I installed along the way was BGInfo from Sysinternals. If you tend to weave your way among a lot of MS boxes, having some basic information on the desktop is a great help.

Anyway, as promised, that sample NTFS filesystem creation session, brought to you via the technical marvel we know as Telnet:

*===============================================================
Welcome to Microsoft Telnet Server.
*===============================================================

C:\home\dominika>diskpart

Microsoft DiskPart version 5.2.3790.1830
Copyright (C) 1999-2001 Microsoft Corporation.
On computer: VA64-2OC

DISKPART> list volume

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     S                FAT32  Stripe      1800 MB  Healthy
  Volume 1     D                       DVD-ROM         0 B  Healthy
  Volume 2     C                NTFS   Partition     24 GB  Healthy    System

DISKPART> select volume 0
Volume 0 is the selected volume.

Microsoft Gripe O' The Day. That "Volume 0" is the one I am testing on - incrementing the underlying number of spindles and watching the performance deltas, especially between FAT32 and NTFS. The gotcha is that if I delete it and recreate it, it might not be Volume 0 anymore. It might be Volume 2. Yesterday Drive C was Volume 0 and Drive S was Volume 2 until I rebooted. Then it changed again. As the volume is the object you have to manipulate, this makes it devilishly difficult to script this stuff. The rest is pretty straightforward;

DISKPART> delete volume

DiskPart successfully deleted the volume.
DISKPART> list disk

  Disk ###  Status      Size     Free     Dyn  Gpt
  --------  ----------  -------  -------  ---  ---
  Disk 0    Online        75 GB    25 GB
  Disk 1    Online        75 GB      0 B
  Disk 2    Online        34 GB    34 GB   *
  Disk 3    Online        34 GB    34 GB   *
  Disk 4    Online        34 GB    34 GB   *
  Disk 5    Online        34 GB    34 GB   *
  Disk 6    Online        34 GB    34 GB   *
  Disk 7    Online        34 GB    34 GB   *

DISKPART> create volume stripe disk=2,3,4,5,6,7 size=300
DiskPart successfully created the volume.

The asterisk in the Dyn column indicates that we are creating volumes spanning "dynamic disks" - an abstraction layer allowing us to spread multiple volumes over arbitrary disks. You can't have a "stripe" of one disk; that should be "simple". The size=300 indicates how much space (Mb) you want on each disk. This (as I noted in my last post) is not the stripe width, over which we have no control.

DISKPART> assign letter=s
DiskPart successfully assigned the drive letter or mount point.

DISKPART> exit
Leaving DiskPart...

C:\home\dominika>format s: /fs:fat32 /v:TestFS
The type of the file system is RAW.
The new file system is FAT32.

WARNING, ALL DATA ON NON-REMOVABLE DISK
DRIVE S: WILL BE LOST!
Proceed with Format (Y/N)? y
Verifying 1800M
Initializing the File Allocation Table (FAT)...
Format complete.

1,883,738,112 bytes total disk space.
1,883,734,016 bytes available on disk.

        4,096 bytes in each allocation unit.
      459,896 allocation units available on disk.

           32 bits in each FAT entry.

Volume Serial Number is A07E-7B4E

C:\home\dominika> iozone -a -z -i0 -f s:\IozoneTest -b c:\t\f6.wks > c:\t\f6.out 2> c:\t\f6.err

...and we are up and away. Its worth saying that DISKPART does a lot of stuff asynchronously so its worth drawing breath between activity inside its shell and outside or else it gets in a muddle; particularly so if you are passing commands in via scripts interspersed with other command-line utilities that interact with the I/O subsystem - this can get it very confused as can multiple concurrent DISKPART sessions.

The numbers generated by this little escapade are interesting and not what you might expect. Later.

( Dec 28 2005, 12:07:57 PM GMT ) Permalink

20051220 Tuesday December 20, 2005

Getting To Grips With NTFS

Getting to grips with NTFS

This blog entry is for the amusement of Solaris folks. Seasoned enterprise Windows administrators, look away.

Figure 1: The Windows Server 2003 Disk Management GUI - Looking Glass, it ain't!

For reasons best not gone into, I have to do I/O benchmarking on Windows Server 2003. To be fair, the command shell language has grown up a lot since I used to teach it to help-desk unfortunates 10 years ago. Scarily, it has adopted Unix style I/O redirection (e.g "2>&1" and so forth) and flow control making it the bastard son of Kornshell and DOS Batch. Hmm. Variable substitution is still reassuringly hellish though.

Configuring up filesystems is not a million miles from format(1M) and metainit(1M). In order to make it more interesting I am working with a server connected to a KVM switch which exports the Windows screen over HTTP. This has some interesting effects;

Anyway enough whinging. How is it going? Well. To start with, its worth saying that S2003 comes with a graphical volume manager.(Control Panel -> Administrative Tools -> Computer Management -> Disk Management). This, as the Help menu item will re-assure you, is provided to Microsoft by the VERITAS Software Corporation, about which I have written before. Now you have found the GUI, forget you ever saw it for two reasons:

Real men in this part of the operating system forest use Diskpart - a command shell which you can use interactively or you can pass it scripts on the command line.This is combined with the Format command, so named to confuse Solaris folk. Diskpart plays the role of format(1M) and metainit(1M). Format plays the role of newfs(1M) or mkfs(1M). Do keep up!

Interaction

I was going to list a quick sample of the filesystem creation process but the KVM web server makes it all too painful to gather the data.. Instead, I feel I probably haven't irritated Jonathon enough by 'fessing up to using XP (my two years at Dell with a Sun Ultra 1 Creator on my desk for similar purposes caused much management wailing and gnashing of teeth) so I'm going to whole-heartedly recommend Bill Stanecks' Windows Command Line Pocket Book from Microsoft Press. If you were brought up in a Unix shell, starting here will cut through a ton of larger books.

The Striping Conundrum

Anyone starting I/O tuning wants to match the modal read and write request of their application to the capabilities of the underlying hardware. The mechanism for achieving this is the volume manager (the functionality of which may or may not be part of the file system but never mind). The mechanics of QFS for example are set out here and its counterpart for Solaris Volume Manager is here. Similar information for Veritas Volume Manager is in this large PDF manual. The point I am making is that anyone with the vaguest interest in tuning their I/O subsystem ends up in this section of the manual for the product of choice. With Windows Server 2003, it was quite hard to find anything on this topic. My web search revealed many pages with bland reassurances similar to;

"With a striped volume, data is divided into blocks and spread in a fixed order among all the disks in the array, similar to spanned volumes. Striping writes files across all disks so that data is added to all disks at the same rate."

This really tells me nothing, or rather it begs more questions than it answers: How big are these blocks? What is the order (round-robin, parallel, ...). How do I change these things? Tantalising isn't it. More digging revealed this gnomic utterance;

"For Windows Server 2003, the size of each stripe is 64 kilobytes (KB)."

Thats it. End of story: I expected more, I really did - especially as I mentioned, its got Veritas written on the label. If I'm missing something (another manual? strange Registry witchcraft?) please let me know (I'm Dominic Kay, I work at Sun; take a wild guess at the email address). I know I could download Mark Russinovich and Bryce Cogswells debugging kit and plough the stack traces to reverse engineer the I/O subsystem for myself but you know that might be cheating. I've looked at the Enterprise, Datacentre and Storage versions of Windows Server 2000 and I can't see the vital difference from the vanilla flavour I'm looking for. By the way, the semantic splicing of those product names is a bit frown inducing, like "Large", "Big" and "Not Small".

So I am left with two possibilities as to why there are no tuning knobs for Windows Server 2003 volume manager;

  1. What we have here is "Volume Manager Lite" and storage seriouzos must upgrade to er...Veritas Volume Manager, maybe.
  2. This volume manager is so advanced, so weighed down by I/O pattern discovery heuristics and self tuning algorithms that it just does not need tuning. To meddle with this piece of software would be like taking a pasting brush to the Sistine Chapel.

We shall see. Talk to you later.

( Dec 20 2005, 01:50:59 PM GMT ) Permalink

Calendar

RSS Feeds

Search

Links

Navigation

Referers