AUtomating an FTP Benchmark

Quick little script to automate an FTP test:

#!/usr/local/bin/perl
###
#waastest.pl
#ftp test procedure automation for waas
#v.099b – 2007.05.05 – Rich Bocchinfuso
#@COPYLEFT 2007 – MTI CTA Team – ALL WRONGS RESERVED
#requires: creatfil.exe ncftpget.exe ncftpput.exe
###

if ($ARGV[0] eq “-help”) {
&usage;
}
if ($ARGV[0] eq “-o”) {
&cmdparms;
}
else{
&menu;
}

sub menu {
&copyleft;
print “Enter target ftp host/ip (e.g. – 192.168.1.10): “
$target = <>
chomp $target;
print “Enter output filename: “
$output = <>
chomp $output;
print “Enter test description: “
$desc = <>
chomp $desc;
print “Enter starting file size in megabytes: “
$startmb = <>
chomp $startmb;
print “Enter ending file size in megabytes: “
$endmb = <>
chomp $endmb;
print “Enter incraments in megabytes: “
$incmb = <>
chomp $incmb;
print “Enter test type [p]ut, [g]et, [a]ll: “
$test = <>
chomp $test;
print “Enter username [e.g. – foo\@bar.com]: “
$user = <>
chomp $user;
print “Enter password: “
$password = <>
chomp $password;

&copyleft;
&beginstamp;
&convert;
if ($test eq “p” || $test eq “put”) {
&put;
}
if ($test eq “g” || $test eq “get”) {
&get;
}
if ($test eq “a” || $test eq “all”) {
&put;
&get
}
else{
&error;
}
&endstamp;
}

sub cmdparms {
$target=$ARGV[2];
$user=$ARGV[3];
$password=$ARGV[4];
$startmb=$ARGV[5];
$endmb=$ARGV[6];
$incmb=$ARGV[7];
$output=$ARGV[8];
$desc=$ARGV[9];
&copyleft;
&beginstamp;
&convert;
if ($ARGV[1] eq “-p”) {
&put;
}
if ($ARGV[1] eq “-g”) {
&get;
}
if ($ARGV[1] eq “-a”) {
&put;
&get;
}
&endstamp;
}

sub put {
open(LOG,”>>$output”) || die(“Can’t open output file: $!”);
print LOG “\n…initiating ftp PUT test…\n”
close (LOG);
for ($count = $start; $count <= $end; $count+=$inc) {
print “…creating $count byte file named file_$count.dat…\n”
system “creatfil file_$count.dat $count >> $output”
print “…putting $count byte file named file_$count.dat to $target…\n”
system “ncftpput -v -u $user -p $password $target . file_$count.dat 2>> $output”
print “…removing $count byte seed file named file_$count.dat…\n”
system “del file_$count.dat >> $output”
}
open(LOG,”>>$output”) || die(“Can’t open output file: $!”);
print LOG “…ftp PUT test complete…\n”
close (LOG);
}

sub get {
open(LOG,”>>$output”) || die(“Can’t open output file: $!”);
print LOG “\n…initiating ftp GET test…\n”
close (LOG);
for ($count = $start; $count <= $end; $count+=$inc) {
print “…getting $count byte file file_$count.dat from $target…\n”
system “ncftpget -v -u $user -p $password $target . file_$count.dat 2>> $output”
print “…removing $count byte file named file_$count.dat…\n”
system “del file_$count.dat >> $output”
}
open(LOG,”>>$output”) || die(“Can’t open output file: $!”);
print LOG “…ftp GET test complete…\n”
close (LOG);
}

sub convert {
# Convert MB to bytes
$start = $startmb*1024;
$end = $endmb *1024;
$inc = $incmb*1024;
}

sub beginstamp {
open(LOG,”>>$output”) || die(“Can’t open output file: $!”);
$datetime = localtime();
printf “WASS benchmark initiatied $datetime\n\n”
printf LOG “WASS benchmark initiatied $datetime\n”
print LOG “\nDescription: $desc\n\n”
close (LOG);
print “…testing and logging latency and packet loss…may take a minute…\n\n”
system “ping -n 10 -l 1024 $target >> $output”
}

sub endstamp {
open(LOG,”>>$output”) || die(“Can’t open output file: $!”);
$datetime = localtime();
printf “\nWASS benchmark completed $datetime\n\n”
printf LOG “\nWASS benchmark completed $datetime\n\n”
close (LOG);
}

sub copyleft {
system “cls”
print “\nWAAS FTP benchmark and test utility\n”
print “v.099 – 2007.05.05\n”
print “\@COPYLEFT 2007 – MTI CTA Team – ALL WRONGS RESERVED\n\n”
}

sub usage {
&copyleft;
print “\nUsage: waastest -help {…displays this help message}\n”
print “Usage: waastest {prompt based interface}\n\n”
print “Usage: waastest -o [command line parameters]\n”
print “waastest -o [-p | -g | -a] [target hostname/ip] [username] [password] [starting file size in MB] [ending file size in MB] [inrement by MB] [output log filename] [\”test description\”]\n”
print “-p … run put tests only\n”
print “-g … run get tests only\n”
print “-a … runs put and get tests\n”
exit;
}

sub error {
print “!error! !error!\n”
print “\”waastest -help\” – for usage instructions\n\n”
exit;
}

vmfs and rdm performance characteristics

It seems as if one of the most debated topics related to VMware and I/O performance is the mystery sounding the relative performance characteristics of vmfs volumes and rdm (Raw Device Mode) volumes.

Admittedly it is difficult to argue with the flexibility and operational benefits of vmfs volumes but I wanted to measure the characteristics of each approach and provide some documentation that could be leveraged when making the decision to use vmfs or rdm.? By no means are these test concluded but I thought as a gathered the data I would blog it so it could be used prior to me completing the whitepaper which all these tests will be part of.

Benchmark configuration:
The benchmarks contained in this document were performed in a lab environment with the following configuration:

  • Physical Server:? Dell dual CPU 2850 w/ 4 GB RAM
    • Windows 2003 SP2 Virtual Machine
    • Single 2.99 Ghz CPU
    • 256 MB RAM (RAM configured this low to remove the effects of kernel file system caching)
  • Disk array
    • EMC CLARiiON CX500
    • Dedicated RAID 1 Device
    • 2 LUNs Created on the RAID 1 Storage Group
    • Two dedicated 10 GB file systems
      • c:\benchmark\vmfs
        • 10 GB .vmdk created and vmfs and NTFS file system created
      • c:\benchmark\rdm
        • 10 GB rdm volume mapped to VM and NTFS file system created?

Benchmark tools:
Benchmark tests thus far were run using?two popular?disk and file system benchmarking tools.

IOzone Benchmarks:

HDtune benchmarks:

HD Tune: VMware Virtual disk Benchmark
Transfer Rate Minimum : 54.1 MB/sec
Transfer Rate Maximum : 543.7 MB/sec
Transfer Rate Average : 476.4 MB/sec
Access Time : 0.4 ms
Burst Rate : 83.3 MB/sec
CPU Usage : 36.9%

HD Tune: DGC RAID 1 Benchmark
Transfer Rate Minimum : 57.1 MB/sec
Transfer Rate Maximum : 65.3 MB/sec
Transfer Rate Average : 62.4 MB/sec
Access Time : 5.4 ms
Burst Rate : 83.9 MB/sec
CPU Usage : 13.8%

One thing that is very obvious is that VMFS makes extensive use of system/kernel cache.? This is most obvious in the HDtune benchmarks.? The increased CPU utilization is a bit of a concern, most likely due to the caching overhead.? I am going to test small block random writes while monitoring CPU overhead, my gut tells me that small block random writes to a VMFS volume will tax the CPU.? More to come….

PSTs on network file shares…

Not a good idea. Someone I know implemented Cisco WAAS and is experiencing performance problems. Specifically the CPU on the WAE device is spiked to 100% utilized. They are attempting to per-position 80GB of data including large 1-2GB PSTs to the WAE (Wide Area Application Engine). In my opinion this is a recipe for disaster. First off Microsoft does not support PST access via network shares, and once you read why you will understand why caching PSTs is an even worse idea.

http://logs.technet.com/askperf/archive/2007/01/21/network-stored-pst-files-don-t-do-it.aspx

http://support.microsoft.com/kb/297019

I ran my own little test by moving a PST to a share, starting wireshark (ethereal) and watching the activity. Accessing the PST over the network makes CIFS alone look very efficient.

I hereby declare today and next week blog catch-up days!

I have just been so darn busy that the blog has suffered, I have about 15 half-started blogs that need to be completed and posted. Today I plan to try to work on a number of them so hope fully I can get some of them posted. Next week I will be at EMC World, the sessions provide a great blogging opportunity so I should be fairly active next week as well. Keep the faith!

Two must have utilities for Windows

Admittedly I still sparingly use Internet Explorer but I found a cool little plug-in that allows me to now run windows updates from a non-IE browser, further limiting my need for IE. Check out it out at http://windowsupdate.62nds.com.

The second utility removes the Windows Genuine Advantage (WGA) from your computer, another fine piece of Microshaft nuisanceware. The original location of the “removewga” was here http://www.firewallleaktester.com/removewga.htm but it appears Microsoft forced the developer to disable the links. You can still grab the utility here http://www.softpedia.com/get/Tweak/Uninstallers/RemoveWGA.shtml .

Open source virtualization

As I mentioned in my previous post I spend this weekend working on rebuilding my home desktop.  You will be happy to note that my VPN connection is now working.  Following the install I decided to test out VirtualBox an OSS (Open-source software) desktop virtualization product that holds some promise to compete with VMware.  All I can say is WOW!  I am a VirtualBox convert, as I am sure most OSS junkies will be.  The product is a snap to install and while I have no idea how it will run on Windows the install on Linux was simpler than my previous VMware install and the footprint is lighter.  VirtualBox only loads a single deamon vs VMware’s three daemons, this is important to me since I only start my VM when the use of Windows is absolutely necessary (aka – a dyer situation).  Of course I did some poking around and found this benchmark of VMware vs. VirtualBox:

  native VirtualBox Vmware
make 64:03 min 107:29 min 101:40 min
grep (100 MByte) 6,7 s 20,2 s 18,1 s

Courtesy of a German review of VirtualBox – (http://www.heise.de/open/artikel/83678)

Right now I am very happy with VirtualBox and I think that we will see VirtualBox become more pervasive in the OSS community and now that QEMU is open sourced other desktop OSS virtualization products based on QEMU may pop up and erode some of the market for commercial x86 products.  I think desktop products like VirtualBox will begin to take a grass roots hold long before products like Xen compete in the corporate data center.  After all I remember back to when I first loaded VMware Workstation 3 on my RedHat 7.3 machine, the delight of being able to run pesky Windows apps without dual booting. I felt a twinge of that same feeling when VirtualBox installed and worked in less than 2 minutes.  After all, in my opinion Linux user looking to run Windows apps were instrumental in putting VMware on the map, is a possible that there is now an OSS alternative knocking on the door of the VMware desktop community?  When will workstation go the way of VMware GSX – FREE?  How long can VMware hold on to the desktop without becoming free?  Eventually all hypervisors will need to be free – it should be interesting to watch.

The prodical blogger returns….

So today marks exactly one month without a single blog entry.  It has been a busy month.  March is the last month of the fiscal year, that coupled with the fact that I spent the past 3 months kicking off a new initiative has really put a dent in  my blogging time.  I hope to turn some of the work I have been doing in the past three months into some cool blog entries.

I am in the midst of finishing up a a lab build out so hopefully I can begin to do some of things I had planned to do in prior months.  On a side note I am finishing up rebuilding my home desktop as well.  Just installed kubuntu and have everything working right now with the exception of the VPN but I am sure I will get it working shortly, just installed pppd and pptpd so once I finish this post I am going to do a quick reboot since /etc/init.d/pppd start and /etc/init.d/pptpd start did not seem to solve the problem I am having.  I appears the kvpnc does not think that the ppp and pptp daemons are running.  I have to say I am pretty impressed with the edgy release of kubuntu.   I have always been a fan of the kde desktop but so many distros modify it so heavily that I had moved away to gnome.  Seems the kubuntu folks did a pretty good job.  Only one change thus far, stopped using kaffeine in favor of kmplayer.  Few minor preference changes like installation of FireFox, KOffice, Gaim, etc… for the most part the distro seems very strong.

Also recommend getting Automatix2 to facilitate the install of mplayer and codecs.