Abusing Solaris attempt #2: stressing out ZFS, PART2

March 15th, 2008

In my last post, the files were being written to an IDE hard disks. Now lets see what happens if we write to /tmp instead. Will Solaris cope with ten million files in /tmp? First, if we want to make use of the compression, we need to make a file system:

We make the files (we can use files instead of real disks…):

anton@solaris-devx ~ $ mkfile 100M /tmp/file1
anton@solaris-devx ~ $ mkfile 100M /tmp/file2

and then su to root to make the ZFS file system (mirrored):

# zpool create crazedPool mirror /tmp/file1 /tmp/file2

I should note that for some reason ZFS didn’t make use of the entire file size:

# zfs list crazedPool
NAME USED AVAIL REFER MOUNTPOINT
crazedPool 110K 63.4M 20K /crazedPool

And now the real test. How about a big file? Lets say, 100G?:

anton@solaris-devx dir1 $ time mkfile 100G woot
real 1m21.995s
user 0m0.191s
sys 0m30.308s

And what about 10000 files, each 10M in size?:
anton@solaris-devx dir1 $ i="0"
anton@solaris-devx dir1 $ time while [ $i -lt 10000 ]
> do
> mkfile 10M la0$i
> i=$[$i+1]
> done
real 1m46.789s
user 0m4.665s
sys 0m43.492s

So far, so good. So now lets push the envelope off the desk. Or maybe off a cliff. Lets see what happens when we make a 100TB file with ZFS!

anton@solaris-devx dir1 $ ls -l megaFile
-rw------- 1 anton staff 107374182400000 Mar 15 18:05 megaFile

and the compression ratio?:

anton@solaris-devx tmp $ zfs get compressratio crazedPool
NAME PROPERTY VALUE SOURCE
crazedPool compressratio 1.00x -

hmm, not quite what I was expecting!

Installing XP in 10 mins!

March 14th, 2008

I’m sure my readers at some time or another have had the pleasure of installing Windows XP. They will also probably had the pleasure of having to wait 3/4 of an hour for it to finish! Well, there is a solution!

Furthering the idea of putting the disk install image in RAM before installing, why not write to a Virtual hard drive, also in RAM (if your using VirtualBox)! Specify /tmp as the prefix to your disks name in the “Virtual Disk Location and Size” dialogue window. The result? An installation of windows that will reboot in about 15 seconds. Of course, this is good for some tasks, but not all! Your millage will vary!

NOTE01: I would recommend your have at least 3GB of RAM before trying this!

NOTE02: If you want to keep the install for good, you will need to copy it off /tmp before you reboot, otherwise your virtual drive will be gone!

I must admit though, it still wont solve any post-install issues!

Abusing Solaris attempt #2: stressing out ZFS, PART1

March 11th, 2008

So last time we pulled out an IDE hard disk, and Solaris lived. It got me thinking…What else can we do to a hard disk that Solaris might not like? What about making a really big file? What about a 9TB file on an 80GB hard disk?:

anton@solaris-devx ~ $ time mkfile 9000G deleteThis

real 120m42.953s
user 0m16.448s
sys 46m55.092s

anton@solaris-devx ~ $ ls -l deleteThis
-rw------- 1 anton staff 9663676416000 Mar 9 02:22 deleteThis

And the machine didn’t die! But what about the compression ratio?

anton@solaris-devx ~ $ zfs get compressratio tank/home
NAME PROPERTY VALUE SOURCE
tank/home compressratio 1.22x

Looks like the ratio is an average for all the files on that file system. So lets try to artificially inflate this value. We can run a little script like this:

#/bin/sh
#A little script to make ten million files each 1 megabyte in size
i="0"
while [ $i -lt 10000000 ]
do
mkfile 10M la$i
i=$[$i+1]
done

The result (after about an hour of making files) wasn’t good:

bash: fork: Not enough space

This looks more like an issue bash had rather than ZFS. So did we push up that compression ratio?:

anton@solaris-devx mess $ zfs get compressratio tank/home
NAME PROPERTY VALUE SOURCE
tank/home compressratio 1.22x -

Seemingly not. To compensate, we’ll do something more crazy for PART2

le blue Screen of death!

March 9th, 2008

I really do wonder whether or not this was a real advert that went out, or if it was just an office joke. Either way, thumbs up!

cd needs execute permissions to work?!

March 9th, 2008

You need execute permission on a directory to cd to it! Is read not enough? In practice, no. The chdir system call requires execute permission to make that directory the starting point for path searches. According to the chdir (system call, section 2) man page:

For a directory to become the current directory, a process
must have execute (search) access to the directory.

So when trussing the output of a failed cd to a directory with no execute permissions we see:

chdir("lala") Err#13 EACCES [file_dac_search]
chdir(”lala”) Err#13 EACCES [file_dac_search]

and as the man page goes on to say:

EACCES Search permission is denied for any com-
ponent of the path name.

Reading this article explains, that of course you can’t execute a directory but rather, that the execute permission bit is reused for different purposes. Without execute permission on the directory, you can’t stat() any files within the directory. Opening, deleting and other operations on a file first require you to stat() it first, as stat() gives you the files inode. Without the files inode, theres very little you can do with it!

Armed with this knowledge you might feel inspired to check out the source code of this call for yourself!

Sun Blade 8000 family, x8450 module POWER!

February 23rd, 2008

Sun has released a new blade module for their Sun Blade 8000 system, the x8450 . With 128GB of RAM in a single module and sixteen hardware threads per module, that means you get 160 threads and 1280GB of RAM in 19 rack units. Pworrrr! If these modules were used in the Sun Blade 8000p, that would give the same performance in just 14 rack units! So in a 42U rack, you can get three of these units in, totaling: 3840GB of RAM, 480 Hardware threads!!!Fantastic! Just make sure you warn your electric supplier!

Boohbah madness!

February 18th, 2008

If theres anyone out there who thought that the Teletubbies were pushing the boundaries of baby tv madness, be prepared for this boohbah.com

The site is mental and makes you wonder if theres a manufacturer out there that makes a pointing device suitable for 2 year olds. The question is…how long did you spend on the site!

VirtualBox, virtualisation for your Solaris Desktop!

February 14th, 2008

So you’ve just installed Solaris because of the well-deserved praise regarding ZFS, SMF, predictive self healing, Zones and Dtrace. And then you said, “It runs vmware, right?”. Well, to my knowledge, no. Not quite. It does run xVM (a breed of “bare metal” type 1 hypervisor, which is very similar to xen.

But more interestingly, it also runs VirtualBox, a type 2 hypervisor which works pretty much like vmware server. This really is a great step to bringing virtualisation to the desktop for Solaris users

All you need to do is download the package, extract and and install it. From there on in, you can use the GUI to create a GuestOS and be running those apps you need! Crucially, it supports the following as Guest OS:

  • Windows XP
  • Linux (Ubuntu 7.10 works a treat)
  • Solaris!
  • …and many other OS, a list can he found here

A little tip to install XP in less than 10 mins:

Make a copy of the disc image as a .ISO file. Then copy that disc image to

/tmp

Be prepared for a hit on the RAM, as thats where /tmp is mounted! Then, before you start the Guest OS for the first time, configure it to mount the disc image from /tmp

Using your main memory as the install medium only leaves the processor and disc writes as your bottlenecks, making installs go really quick!!!

Of course, once your Guest OS is installed, be sure to delete the disc image you copied into /tmp

Happy hypervising! (its probably not a real word, but its great for telling people who aren’t into computing….”yeah, I’ve been hypervising for a few days now now….”.

your friend “…..hmmm, is that bad for your health?”

Abusing Solaris, attempt #1: Random IDE drive pull

February 10th, 2008

This is going to be the fist in a series of random tests (completely unscientific) that I perform on an x86 machine with Solaris 10 installed.

This week, it consists of pulling out an IDE drive having just told StarOffice to save an open file. No preparation, no telling Solaris what was going to happen, simply pull the drive whilst Solaris was up and running. I can’t think why you might want to do this, but it seemed like a fun test. First, the power cable was pulled out, then the data cable.

The test results: you guessed it, when the drive was pulled, no requests for anything that wasn’t already in main memory hung. This included StarOffice hanging, waiting for the destination drive to be reachable before it could let me try and save the file to disk.

As soon as the drive was connected back up again (data cable first, then power), the system was happy again, and StarOffice proceeded to save the file!

I should point out that the disks was not part of any RAID configuration :)

According to this survey, I should be living in Paris…nice!

February 4th, 2008

What City Should You Live In?

You should live in Paris. The city of lights will appeal to your appreciation of beauty and romance. You are a lover and a poet by nature, and Paris’ sensitive charms will be a perfect match for yours.
Find Your Character @ BrainFall.com