Mittwoch, 22. Juni 2011

How to convert MBps to IOPS or calculate IOPS from MB/s

Most SSDs have two speed ratings for reading as well as for writing. The first rating is the sustained MB/s performance, which is the main marketing most manufacturers use. The second rating is the 4K Random IOPS performance, which gives a much better idea of how the drive will perform in the real world. The sustained MB/s rating is the sequential transfer rate the SSD will maintain continuously, such as over a period of 30 seconds. The 4K Random IOPS on the other hand is how many 4K (4096 byte) operations the drive will handle per second with each block being read or written to a random position.
Usually when a Random 4K IOPS figure is given, it may state that this is at a certain queue depth, such as 4, 16, 32 or 64. With a queue depth of 4, this means that there are 4 separate threads taking place with the drive, each thread independently running its own transfers. With the use of Native Command Queuing (NCQ), the SSD can handle these threads simultaneously to improve the overall throughput compared to running a single thread. While many hard disks use native command queuing to line up read/write operations to minimise seek times between each read/write operation, SSDs can read from and write to multiple NAND cells simultaneously, where as the read/write head in a hard disk can only be in one physical place at any time.
While it is nice to see how many IOPS a drive is capable of, it is also useful to see how this translates into actual throughput or even vice versa. For example, most benchmark tools such as CrystalDiskMark and AS SSD report the random 4K performance in throughput, i.e. MB/s, while the SSD’s specifications usually rates the 4K performance in IOPS.
To see how to translate MBps into IOPS and vice versa, we need to do a little math:
IOPS = (MBps Throughput / KB per IO) * 1024
Or
MBps = (IOPS * KB per IO) / 1024
So let’s say we have an SSD claiming a Random 4K write speed of 20,000 IOPS and it achieves 76.2MB/s in the CrystalDiskMark with the QD32 write test.
To convert the 76.2MB/s to IOPS, we perform the following calculation:
IOPS = (76.2 / 4) * 1024
IOPS = 19.1 * 1024
IOPS = 19,558.4
To see what throughput we need to achieve to match the actual 20,000 IOPS claim, we can perform this calculation in reverse:
MBps = (20,000 * 4) / 1024
MBps = 80,000 / 1024
MBps = 78.125MB/s
Note that each manufacturer uses its own method of coming up with their SSD IOPS ratings. Besides separate IOPS ratings for read and write speeds, a given SSD can behave quite different depending on the type of data being read or written, as well as the duration this transfer takes place. For example, an SSD that achieves 5,000 Random 4K IOPS sustained write over a period of 30 seconds may only achieve 1,000 IOPS sustained write over a period of 5 minutes. For SSDs using the SandForce processor, the compressibility of the data also has an impact, so two benchmark tools may show completely different IOPS readings if one tool sends uncompressible data and the other tool sends highly compressible data and also if one runs the benchmark for longer duration than the other.

Donnerstag, 9. Juni 2011

Unix shell unter Windows

C:\Documents and Settings\takoloko>dir | grep *.jpg

Mit den UnxUtils könnt ihr eine ganze Reihe nützlicher Linux Programme bzw. Befehle in der Windows Command Line verwenden. Beispiele: gawk, grep, less, unrar, wget.
Eine komplette Liste der UnxUtils Befehle findet ihr auf der Homepage.

Installation UnxUtils

  1. Downloaden – Die UnxUtils sind in einer zip-Datei gepackt, die ihr euch bei Sourceforge downloaden könnt. Die Datei heisst UnxUtils.zip (nicht UnxUtilsSrc.zip!).
  2. Entpacken – Als nächstes müsst ihr die Datei in C:\ entpacken.
  3. Pfad anpassen – Um die Befehle in der Command Line nutzen zu können, müsst ihr noch die Pfad Variable anpassen. Rechsklick auf den Arbeitsplatz -> Eigenschaften -> Reiter “Erweitert” -> unten auf “Umgebungsvariablen” -> im unteren Feld die Variable “Pfad” auswählen -> Doppelklick auf die Variable -> am Ende der Zeile ;C:\usr\local\wbin der Pfadvariable hinzufügen.
  4. Fertig

Links:

Autostart Windows 2008 Server [All Users]

%ProgramData%\Microsoft\Windows\Start Menu\Programs\Startup

Mittwoch, 8. Juni 2011

Add a new Partition on opensuse 11.4

1. Plan the new filesystem. Where would you like to use the new space? Do

df

to print a summary of free/used space on each of the existing mounted partitions. Do

du

on selected directories to find their size.

For example, I would consider using new hard drive space in one of the following mount points:

/usr/local
/home
/home/share/downloads
/usr/local/mp3s
/usr/local/dos_data

Here is Details.

/usr/local is suposed to survive any upgrade of Linux. It is nice to have it on a separate partition because I can even reformat other partitions without affecting my local contents stored in /usr/local. I surely want it of the type "ext2" or perhaps "reiserfs".

/home contains user data. Surely, it is the data that deserves the most care. It is obviously supposed to survive any upgrade of Linux. Wow, obviously I want it on a separate partition. The type is normally "ext2" or "raiserfs".

/usr/local/mp3s is a non-standard Linux directory. I may keep my MP3 (music) files there. Those tend to be large.

/usr/local/dos_data. Another non-standard directory. If I dual boot, I would consider making an extra partion of the type "DOS FAT32" or similar so as to share files between MS Windows and Linux transparently (both ways). I would configure all the Windows-based programs to use this "drive" as the default location for all user-generated files. I could even have "mp3s", "cds" and other such directories in this location. The serious drawback of this approach--MS Windows may insist on messing up with this partion on re-install.

2. Partition the new hard drive. For example, if my new harddrive is the slave on the second IDE interface (perhaps the "fourth" IDE drive), I could use:

cfdisk /dev/hdd

or the more old-fashioned (and standard) tool:

fdisk /dev/hdd

If your drive is not "hdd" adjust the above command as needed.

hda -- first ide master (whole disk)
hdb -- first ide slave
hdc -- second ide master
hdd -- second ide slave
sda -- first scsi (whole disk)
sdb -- second scsi (whole disk)
...
sdp -- sixteenth scsi (whole disk)

For other disks, consult /usr/src/Linux/Documentation/devices.txt.

Most of the time, Linux partitions to be of the type ext2 ("Linux").

Partitioning can be tricky--if you never have done it, read man fdisk and man cfdisk. It is very easy to delete a partition with all your data. Make sure you know which disk you are working with!

fdisk or cfdisk does not make any changes to the hard drive until I write the new partition layout. So if I make a bad mistake, I can always quit without writing. I write the layout to the drive only when I am completely done.

3. Format each partition. For example, to format the first partition, while checking for bad blocks (-c), I would do:

mkfs -c -t ext2 /dev/hdd1

4. Test the new partitions around. Mount the new partitions manually (the mount directory must exist and be empty). Copy a bunch of files to each partition. View/edit a couple of random files. Delete them all.

5. Copy data. Optional--only if you would like to move data from an old partition to a new partition. Go to the single-user mode (init 1). Mount the new partition manually. Copy the data from the old partition to the new partition. Careful with the old data, you probably don't want to lose it if you made a mistake, so I wouldn't delete it yet--I rename the top level directory appropriately. E.g.,

cp -R /usr/local/ /mnt/hdd1/
mv /usr/local/ /usr/local.old.backup_of_2005-04-21

6. Edit the file /etc/fstab. Modify it to reflect your new filesystem layout. Perhaps, insert the mountpoint for the new partition(s) or modify any old mountpoints as needed. For example, if moving /usr/local to its own partition, I would need to add to add a line like this:

/dev/hdd1 /usr/local ext2 defaults 1 2

7. Reboot and test. The alternative to reboot is to unmount old and mount new mount points. For example:

umount /usr/local
mount -a

but hard reboot may be a more rigorous test of the new layout.

8. Remove old data. After a few days, when I have the confidence everything is really working fine

Montag, 6. Juni 2011

openSuse 11.3

vim /etc/HOSTNAME
vim /etc/hosts

Um den Hostnamen zu ändern

Sonntag, 5. Juni 2011

Häßliches Win7 - winsxs

Hallo der winsxs Ordner unter Windows 7 wächst immer weiter, was kann ich dagegen tun:

DISM.exe /Online /Cleanup-Image /spsuperseded


Danach sollte das Problem behoben sein.

Montag, 16. Mai 2011

Installation der XenDesktop Applikation

A number of the Citrix products (XenDesktop, Provisioning Server, etc.) are capable of utilizing a SQLExpress database to allow for a simple installation experience. Unfortunately, if your install gets whacked or you want to start over there isn't a simple, GUI way to delete the SQLExpress database in order to start over. Many people end up either installing, or using existing installs, of the full SQL toolstack to accomplish the task. Or they end up scrappping what they've done and start over. This post describes the process of deleting the database using the CLI tools that are installed with SQLExpress itself. I will discuss the specifics for XenDesktop 5, but the process is similar for other products.

I must preface this to say that I have not done rigorous testing to determine if there are detrimental side-effects to the following process. I've used it a number of times and have not experienced abnormalities. But, as always, this is not endorsed by Citrix and your mileage may vary.
Use at your own risk!

  • Close Desktop Studio.
  • Stop Services
    • Citrix AD Identity Service
    • Citrix Broker Service
    • Citrix Configuration Service
    • Citrix Diagnostic Facility COM server
    • Citrix Host Service
    • Citrix Machine Creation Service
    • Citrix Machine Identity Service
  • Click the Start menu, type "cmd"

Note: Different versions of SQLExpress store the sqlcmd command in different directories. It's easiest to use Windows Explorer to search C:\Program Files\Microsoft SQL Server for the correct location.

  • Change to the binary directory where sqlcmd resides:
    cd \Program Files\Microsoft SQL Server\100\Tools\Binn
  • Connect to the local SQLExpress database instance:
    sqlcmd -S localhost\SQLEXPRESS
  • List the databases to determine the name of the database to drop:
    sp_databases
    go
  • Drop the database
    drop database CitrixXenDesktopDB
    go
  • List the databases again to validate it is no longer there:
    sp_databases
    go
  • Exit sqlcmd:
    exit
  • Start Services
    • Citrix AD Identity Service
    • Citrix Broker Service
    • Citrix Configuration Service
    • Citrix Diagnostic Facility COM server
    • Citrix Host Service
    • Citrix Machine Creation Service
    • Citrix Machine Identity Service

When the services spin up the have a rude awakening because the database that existed when they shut down no longer exists. We now have to tell XD5 to start over.

  • Open Desktop Studio
  • On the "Specify the address of a Controller in the site you wish to administer" window select "This machine" and click OK
  • Click Yes when prompted with, "The services are no longer permitted to access the configured database. Would you like to reset the services and retry?"
  • Click "Desktop deployment" on the main Desktop Studio screen
  • Complete the wizard as usual, with the exception of selecting "Use existing database" for the "Database configuration" element and leaving the default values.
  • Click OK to automatically create the database