A Solaris Administrator Looks at OpenSolaris

来源:互联网 发布:为什么注册淘宝账号 编辑:程序博客网 时间:2024/05/06 03:28
Let's take a closer look at OpenSolaris, particularly its use of ZFS,network problems that people have reported, the use of bash, anddifferences between OpenSolaris and Solaris and Solaris Express. Note: This is the latest article in our OSNews Article Contest.

Why am I writing this?

After reading reviews from ArsTechnica and phoronix.com aboutOpenSolaris, here is what I know about OpenSolaris based on those tworeviews:

1.That OpenSolaris uses the LiveCD format similar to Ubuntu and Knoppix.
2.That the OpenSolaris community has improved the installer to make a more "friendly" installation experience.
3.That the Gnome desktop environment is used and includes the standardassortment of desktop applications, except for office software(OpenOffice).
4.That OpenSolaris doesn't ship with the latest and greatest applications.
5.That hardware support is still a problem.
6.That Sun has a long way to go before the reviewers are happy with OpenSolaris.

What I did not find in either article:

1.Any significant attention paid to ZFS as the default filesystem other than the mention of it in the ArsTechnica piece.
2.What network hardware was used by Ryan Paul in the ArsTechnica article that he had trouble with.
3.That bash replaced the Bourne shell as the shell for root and ksh was upgraded to ksh93.
4.What is included under /usr/gnu.
5.What did not ship with OpenSolaris that would normally be associated with Solaris or Solaris Express.
6.No mention of root as a role or how to change it.

While the phoronix review was conducted with a preview release ofOpenSolaris, the ArsTechnica article was published a week after therelease. Neither review goes into much depth beyond the GUI, installedapplications and a list of wishes and complaints. While this might beacceptable to some, I was hoping for something more than a quick lookto see if OpenSolaris is in parity with Ubuntu or Fedora as a desktopOS.

Starting OpenSolaris

Using the Live CD has one distinct benefit and that is the DeviceDriver Utility, running this tool identifies the hardware in yourmachine and shows you where you could have problems in terms of devicesupport based on the drivers that ship with OpenSolaris. If yourhardware is not supported than all you have wasted is the time todownload OpenSolaris and burn it to a CD.

Installation

I had minor difficulties when attempting to install OpenSolaris onmy Gateway 7405 GX laptop that had a NTFS partition where if I selected"Use whole disk" the installation would fail. Selecting partition thedisk allowed me to proceed with the installation. The installationroutine starts off with two selections about language that are textscreens, once those selections are made the graphical installer runsand the rest of the installation is performed through the installer.

While some are happy with the progress that Sun has made with theinstallation routine, others still complain that the first part of theinstallation routine is text based. I do not see a problem with theinstallation routine at all. This is not just because I have used Sunproducts for years and have become used to the install routine. Theinstall program is simple and straightforward, I don't see the need toimprove something that works.

Bash as a root shell

One the major changes from Solaris and Solaris Express is using bashas the shell for the root user as opposed to the Bourne shell, whichhas been a part of Solaris since version 1. I do not spend that muchtime as root to justify a shell with an increased level of usabilitysince the vast majority of the administration I perform is at thesysadmin group level (14). For those who want to change the shell backto /bin/sh, or whatever you like is a two step process, the first is toremove root as a role using the following command:

rolemod -K type=normal root

Once that is done, using usermod -s, you can change the shell for root to the desired shell.

The /usr/gnu directory tree

Checking under the hood one finds /usr/gnu, where GNU specificutilities can be found. The complaints I mostly hear are for gtar(/usr/bin/gtar), autoconf which is not part of the distribution oravailable at pkg.opensolaris.org, and neither is automake, but that canbe downloaded from pkg.opensolaris.org. For some software that iswritten specifically to be compiled under Linux or with the completeGNU tool chain, there is potential for problems since the tool chainmight not be complete enough depending on what you are trying tocompile.

Getting On the Net and configuring interfaces

One of the many things people complained about, including Ryan Paulof ArsTechnica is the difficulty in getting an OpenSolaris machine onthe network and to access the Internet. For the purposes of writingthis review I used two machines to compare and contrast setting upnetworking. The first one is a home built Pentium IV machine using anAsus motherboard with 1.5 GB of memory, 2 250 GB Western Digital IDEdisks, an ATI Radeon 9100 AGP card, and a Intel Pro/1000 PCI NIC. Thesecond machine is a Gateway laptop with an Athlon 64 CPU, 1.25 GB ofmemory, a 60 GB 7200 RPM hard disk, a ATI Mobility Radeon 9600 videocard, a VIA Rhine II 10/100 NIC, a Broadcom internal wireless card anda Proxim Orinoco Gold PCMCIA wireless card.

Using the Pentium IV rig nwamd set up my Intel Pro/1000 NIC to an IPaddress of 192.168.1.180 using the DHCP server OpenSolaris runs (at thetime I installed OpenSolaris on this machine I did not use DHCP on myrouter), the entries for DNS were wrong, and as a result I had onlylocal network connectivity. I modified the /etc/resolv.conf to populatethe file with good DNS servers and modified the hosts entry of/etc/nsswitch.conf and was immediately able to access the Internet.

The Gateway laptop's internal Broadcom wireless and the VIA Rhine II10/100 interfaces had no drivers, but the Proxim Orinoco Gold PCMCIAcard was recognized by OpenSolaris and ready for use, discovered mywireless access point and I was prompted for my WEP key. Once that wassupplied the machine received an IP address from my router afterstarting the DHCP server and my laptop was on the network.

Using ips

When I wanted to compile iozone to run some benchmark tests againstZFS volumes, I discovered that gcc was not included as part of theOpenSolaris LiveCD. The standard answer for a Solaris user would be touse either Steve Christainsen's SunFreeware or Dennis Clarke'sBlastWave to get gcc, with OpenSolaris there is the Image PackagingSystem which is new to OpenSolaris. Checking with the web sitepkg.opensolaris.org I found gcc was available and to download andinstall the package took one command from a term window:

pkg install SUNWgcc

The package was downloaded and installed successfully, and runningwhich gcc produced the result of /usr/bin/gcc. For those who prefer agraphical tool, a package manager is included as part of the desktop.While there are some people who think a graphical package managementtool is a necessity, Michael Larabel states "and expecting some usersto use the command-line to install packages is not an option". I don'tagree with that assessment at all, I see it as a nice to have since thecommand line version works from either a term window or the console ifyou have Gnome shut off. It simply comes down to a matter of personalpreference and what you are trying to achieve.

While ips may appease Linux users for now, the bigger question ishow long will it be before the standard complaint about Sun'srepository not having the latest software comes up. That question wasanswered by both Ryan and Michael in their respective articles wherethey pointed out that Gnome was not as up to date as Ubuntu and Fedora.The real question is whether the difference between the versionsprovide so much increased functionality that it would be a show stopperfor users, or is it just more complaining?

Sun tends to be a little conservative when it comes to addingsoftware to Solaris, and I don't see the trend changing withOpenSolaris. I see this as good because I would rather have a stableplatform that works than one that has all of the latest software thatdoesn't work.

ZFS as the default filesystem

The biggest, and, for many, the most anticipated change is using ZFSas the default filesystem over UFS, the current standard for Solaris.This is the feature I have been waiting for Sun to put into Solaris forsome time. I recently had to replace a bad disk in a ZFS mirror on oneof my production systems at work, and there is nothing I like more thandetaching the bad disk with a single command, removing the bad diskfrom the system and replacing it with the new disk and attaching itwith a single command. Anyone having experience with Solaris VolumeManager or Solstice Disk Suite will quickly appreciate what ZFS bringsto the table in terms of ease of administration of volumes.

ZFS performance

A lot has been said about the performance of ZFS, in many casespeople have said the performance of ZFS is poor, particularly on 32-bithardware without much in the way of data to back it up. I decided totest for myself what the performance of ZFS was for the two systems Iam using for the review using iozone by William Norcott and Don Capps.In both cases iozone was compiled as a 32-bit binary and the followingoptions were used at runtime, -RAb machine name.wks -g 2G. I used the-A option for small file sizes as well as the larger ones normallytested by iozone. The 2G option specifies testing up to a 2 gigabytefile size, so that any disk caching is no longer effective, thus whatis being measured at the point the cache is exhausted is theperformance of the raw disk or disks.

The Pentium IV machine is configured with a ZFS rpool mirror usingtwo Western Digital 250 GB disks across the same IDE adapter, whilethis is not going to provide the best performance, it is a realisticconfiguration for a user who does not have a SATA system or cannotseparate the disks due to some issue with their system. Tests wereconducted on this system with the mirror and single disk configurationsto see if there was any loss of performance mirroring disks with ZFS.

The results of the tests are interesting to say the least. The32-bit read test on cronus shows an odd dropoff at file sizes above 256kb that I cannot explain.
cronus single disk read.jpg
The write test shows a similar dropoff but the dropoff occurs above 32 kb.
cronus single disk write.jpg
Creating a ZFS mirror of the root disk and running iozone producedsimilar results to the single disk performance, the only oddity beingthe peak and valley on the read test at 32 kb.
cronus mirror read.jpg
cronus mirror write.jpg
Based on my limited testing I did not see any significant performance degradation using a ZFS mirror.

The Gateway laptop has a single Hitachi 60 GB 7,200 RPM disk, so Iexpect the performance of the laptop to be at least on par with thedesktop machine. The 64-bit tests ran on the Gateway laptop producedequally interesting results . The read test showed a peak for 64, 128and 256 kb file sizes and then leveled off and stayed consistent untilthe 1 MB file size, where performance dropped off. Once the requestsize got above 128 kb there was another significant drop in performance.

apophis ZFS read test.jpg

Examining the write performance, there is a buildup as the requestsize increases to 64 kb and the file size to 128 kb. And along with the32-bit test there is the unexplained falloff at 128 kb. As the requestsize reached 4096 kb there is another signifcant drop.

apophis ZFS write test.jpg

To compare and contrast the performance of ZFS to ext3 I used Fedora9 and Ubuntu 8.04 x64 on my Gateway laptop. I partitioned the 60 GBdisk with 59 GB for / and 1 GB for swap. In both cases I compilediozone as a 32-bit binary and used the same options as the OpenSolarisZFS runs (-RAb -g 2G). Ubuntu required the addition of thebuild-essential package before iozone could be compiled. Also, allappropriate updates were made to each OS and the machine rebooted priorto the test runs.

The Fedora 9 read test shows a series of peaks and valleys where ext3 favors particular file and request size combinations.
apophis fedora read test.jpg
The behavior is mirrored in the write test.

apophis fedora write test.jpg

Ubuntu 8.04 also showed an interesting pattern of peaks and valleys in the read and write tests.
apophis ubuntu read test.jpg
In particular the write test shows poor write performance with filesizes up to 512 kb. Then there is a peak at 2048 and 4096 kb, a secondpeak at 8192 kb with a file size of 1024 kb, a significant drop at 32and 64 kb, a third peak at 256 and 512 kb then the final drop withfiles 512 kb and greater.
apophis ubuntu write test.jpg

I also tested the performance of ZFS on a external hard disk (theoriginal hard disk that shipped with the Gateway) an 80 GB 4,200 RPMHitachi Travelstar with 2 MB of cache. The results look very similar tothat of the root disk tests with the same peak for small file reads.

apophis USB read.jpg
apophis USB write.jpg

The point of the testing is not to say that ZFS is superior to ext3,but to illustrate differences between OpenSolaris and two popular Linuxdistributions in terms of disk I/O without tuning, "out-of-the-box"performance. Could the disk performance be improved, potentially yes.But tuning disk I/O is best done with care because the tuning couldactually result in worse rather than better performance. There is nodoubt that your mileage will vary based on any number of factors andthese tests only demonstrate the performance potential of the twosystems I tested.

What is missing

Examining the CD I found that the directories and files normallyassociated with creating Flash Archives and building a JumpStart serverand clients were missing. For those of us who use JumpStart and Flashto build and clone machines, this is a major omission. I can only hopethat subsequent releases include this functionality because it would bea shame not to have them. The graphical management tools found onSolaris and Solaris Express, the Solaris Management Console (SMC) andwebconsole used for the graphic administration of ZFS volumes are alsonot part of OpenSolaris.

Ryan Paul pointed out that an office suite was not part ofOpenSolaris, this is the only real problem area I had with OpenSolaris.My attempt to download OpenOffice from pkg.opensolaris.org resulted inme only getting the database product. Downloading OpenOffice andinstalling it failed with not being able to find Java despite it beingpresent. While I was in the final phases of writing this I was able tosuccessfully install OpenOffice 2.4 on the Gateway laptop.

Will these tools be added at some point in the future, I don't know.This will depend on whether Sun wants to go beyond a Live CD to installdistribution to a full DVD install like Solaris and Solaris Express.

Conclusion and final comments

While Sun is making attempts to appease the Linux community, Sunalso cannot ignore the Solaris community (which I am a member of) whofeels that while there is always room for improvement, that Solarisshould be left alone. As a person who has used Solaris over 10 years, Ifelt right at home with OpenSolaris and was able to immediately use theOS to do things without too many issues. Most of the majorfunctionality that I have grown accustomed to in Solaris is present andworks.

Whether the amount of Linux like functionality incorporated inOpenSolaris is enough to please Linux users it is hard to say, onlytime will tell.

原创粉丝点击