"Linux In A Commercial Environment"
Bradley Marshall
brad.marshall@member.sage-au.org.au
Plugged In Software
Brisbane
Abstract
With the ever increasing costs of software licensing and lower performance of "commercial" operating systems over the "free" Unixes, Linux performs admirably on both the desktop and server roles. After initially running Solaris on Sparc hardware, it was found that using Linux gave a marked increase in performance.
This paper will focus on the trade-offs made in choosing a "free" operating system, problems that were overcome, some advantages / disadvantages of using Linux from both the server and desktop perspectives and comparisons made between the more common OSs.
A brief overview of how the desktops and servers are deployed, the roles which each machine fulfills, a history of how the network evolved, and the decisions that influenced this are included.
What is Linux?
Linux is a free operating system, designed by Linus Torvalds and a cast of thousands. It runs on many different hardware platforms, which include Intel, Digital and Sun. Leading edge features have been built into it, and it is constantly being improved.
Background
Plugged In Software (http://www.pisoftware.com/) is a start-up Java development company, that also does consulting work, including web design etc. It was started two years ago by David Wood (dwood@pisoftware.com) and Bernadette Hyland (bhyland@pisoftware.com).
What is this paper about?
This paper attempts to describe the network environment that has evolved over 2 years, and discusses some of the ramifications of using Linux, and why it was chosen. Other alternatives are explored, and the problems encountered with them explained.
Network Design
As the company is a dynamic business the network design had several key requirements - flexibility, adaptability, scalability and extensibility. It also had to be as cost effective as possible. The main use of the network is for Java development, which means one of the most important factors is the ability to be able to access the network resources in a cross platform manner and to be able to add a machine to the network in minimal time.
Due to the ever-changing environment, users needed to be able to log in from any workstation and receive a consistent environment and access to the shared files. This allows them to work in a familiar environment and increase productivity.
Why Linux?
Linux has many advantages which make it suitable for use in both a server and desktop role. It is freely downloadable from many locations, such as http://www.linux.org/. One of the major advantages is that it gives a consistent environment from server to desktop, which reduces the administration requirements. Networking is integral to Linux, which makes it simple to maintain an office of desktops, and several servers from the one location. Many of the scripting tools available also ease the administration load, by automating many common tasks.
While Linux doesn't have a "vendor", as such, there is a huge community of users behind it, for both support, and further development, and this is where Linux really performs. There are many ways of getting support for it, ranging from Usenet (e.g. comp.os.linux.*), to mailing lists, and irc channels, (e.g. openprojects.net). This is also evident in the rapid development in the linux kernel, which results in such features as the new video drivers, which support peripherals such as QuickCam Videos and many others.
This rapid development is also obvious in the speed of bug fixes. There are two "streams" of kernel development - stable and development. The stable kernels are only bugfixes, whereas the development series is where further development, and new features are added. Almost as soon as a bug is discovered, a fix is developed. An example of this is the "ping of death" bug - there was a patch out in just under 2 hours, and it was only that long due to the fact that no Windows machine could be found for testing!
In the server role, Linux fulfills its role admirably. It integrates well into a network, and has support for nearly every major platform. File and printer sharing for windows is supported through Samba (http://samba.anu.edu.au) and Macs by Netatalk (http://www.umich.edu/~rsug/netatalk/). Linux gives a new lease on life to older hardware, as its requirements in terms of CPU and RAM are low, which allows more efficient use of resources. Additionally, it runs on many platforms, eg Sun, DEC Alpha, PowerPC, Motorola 68k, etc, so it can be used on older hardware. This allowing more to be done with existing resources.
Platform |
URL |
Linux PPC |
http://www.linuxppc.org/ |
Linux for Sparcs |
http://www.geog.ubc.ca/s_linux.html |
Alpha Linux |
http://www.azstarnet.com/~axplinux/ |
Linux/M68K |
http://www.clark.net/pub/lawrencc/linux/index.html |
There are many Linux distributions, including Slackware, Debian, SuSE, Redhat, and many others (see table below). For a consistent environment, we standardised on one - Redhat. It was chosen mostly because of its ease of installation, and also the fact that most freeware and commercial products for Linux seem to be available in the Redhat package format (.rpm).
Distribution |
URLs |
Redhat |
http://www.redhat.com/ |
Debian |
http://www.debian.org/ |
Slackware |
http://www.slackware.org/ |
SuSE |
http://www.suse.com/ |
Caldera |
http://www.caldera.com/ |
Microsoft Windows
One of the first choices for many companies when looking for an operating system to use is Microsoft Windows. Many times this choice is made through lack of knowledge of the alternatives. Why Windows NT wasn't chosen in this case boils down to one simple fact. It was tried, and simply didn't work reliably for our development and production environment.
On the server side, Windows is unsuitable for several reasons - mostly due to instability, and the lack of remote access administration. Another problem is that the GUI is on all the time, which puts extra load on the server for no advantage. Uptime in Windows machines are generally measured in hours, whereas Unix machines generally have uptimes in terms of months, if not years.
Windows NT does not excel in file and print sharing support for many of the other platforms that exist. It also doesn't integrate well into a heterogenous environment.
From the desktop side, it was not satisfactory as a development environment because it lacked certain tools, and the ability to automate many of the common every day tasks. Revision control on files was also required, and was not easily done. Scripting is lacking, and it is difficult to use multiple desktops / pagers. When running the Java virtual machines (JVMs) for testing code in an interactive process, due to instability, reboots are required which chews into developer's time. It is important that a user level process not be able to take down the entire OS.
There are basically 4 issues with Windows NT that makes it unsuitable -
The remote admin that comes with WinNT is lacking in many ways, mostly that you can't do the same things remotely as you can on the console, which you can with Linux (or indeed, any Unix variant). Windows is also less stable as evidenced by the fact that the uptime of Unix servers can be measured in years, and the uptime of Windows servers in months (in the extreme). A blue screen of death (BSOD) is also common in most of the Windows variants - this frequently occurs when an illegal instruction is performed, or for a myriad of other reasons. Another stability issue is that it seems that for every configuration change made - or indeed, every new program installed - to a Windows machine requires a reboot. This is unacceptable in an Internet server environment, which requires maximum availability.
The next two factors are related - speed, and real multitasking. Windows appears to make less efficient use of resources than many other operating system, which results in lower speed. Multitasking on Windows isn't preemptive, which means that when a program requires resources, the CPU can't interrupt or swap out the running program and give the required resources to the program. This lack of real multitasking also means there is an apparent slowdown in the system, as responsiveness when swapping between applications is low.
Security on Windows is rather lax - if a user has access to the console, they can do anything they wish. In contrast, Unix has a decent permissions scheme, with file permissions and other mechanisms. Additionally, a fundamental concept for a file server, quotas, is not available as a native feature for Windows NT, and has to be bought as a third party product - this means it is easy for a user to fill the filesystem, and crash the system.
One of the advantages of Windows on the desktop is that it runs the popular Office suite which includes Word, Excel, and PowerPoint, as well as many other popular productivity applications. However, there are many ways of running this suite on other platforms, ranging from Wine (http://www.winehq.com/), a open source project, to Wabi, a commercial product from Caldera (http://www.caldera.com).
Cost is also a big factor in the unsuitability of Windows - not just in terms of money, but in time. A 5 user license of Windows NT, the "server" offering from Microsoft, is in the order of $1000 - whereas an unlimited "license" of Linux is free. Also, a lot of functionality that is required in Windows requires the purchase of third party software, which increases the total cost of ownership. The administration costs of Windows are also higher, as it requires more administration time devoted to it.
Solaris
On the server side, Solaris has many advantages, but also some disadvantages that made it unsuitable in one way or another. The primary advantage Solaris has is its stability. There are reports of uptimes in terms of years using Solaris boxes - Plugged In had a Solaris server up for over 14 months. However, nowadays Linux is almost as good in this respect, with uptimes in terms of a year or over not uncommon. The main reason for Linux downtimes is upgrades, as Linux is in a state of continual improvement, and consequently continually changing.
Another advantage that Solaris has is commercial support. It has been around for quite some time, and there are many companies devoted to supporting it on a day-to-day basis. Being a commercial product, it also has the backing of Sun (http://www.sun.com) behind it. This commercial support is also evident in the number of commercial products available for it from companies ranging from Netscape to, of course, Sun.
On the downside there are only a couple of issues, but these were seen as key for allowing them to perform in the server role. Security patches for Solaris sometimes take a long time to appear and bugs appear to be ignored for quite some time. To keep Solaris secure and up-to-date takes a fairly well-trained administrator, equal to or surpassing the administration requirement for Linux.
Cost was also a factor - generally a support contract is purchased for each machine, which includes upgrades for a certain period of time - and this is usually fairly high. There is no advantage seen in this. Peripheral support in Solaris is also lacking - if Sun didn't make it, there doesn't seem to be a driver for it; and with the phenomenal array of peripherals available for the Intel platform, this is a significant downfall. For example, Solaris support for modems was lacking, and it was fairly difficult to configure. Older Sun hardware (which is affordable) uses the more expensive and uncommon SBUS architecture, whereas the newer Suns use PCI, which is much cheaper.
Problems with Linux
Due to the development model of Linux, to some it appears surprising that Linux is suitable for a commercial environment. And, admittedly, there are some problems with Linux. Most of these are due to the fact that there is no one central location that controls every aspect of its development. This means that, for example, there is (generally) no warranty that comes with Linux, or that there is no one person you can point to when there are problems. However, this is changing, as companies such as Redhat or Caldera start providing support and warranties with purchase of their distribution.
In a desktop environment, there is a lack of commercial quality applications, like Microsoft Office, and the myriad of other applications required for an office. As Linux matures, however, there are more and more applications of this type appearing. Unfortunately, some of these applications lack the polish of the commercial offerings, as they just haven't been available for as long and had enough time to mature. The future is looking very promising in this regard, with applications such as Applixware, the GIMP, Star Office, Word Perfect, and many more appearing. Due to the fact that Linux has been developed by technical users, it requires a certain degree of technical knowledge.
Java Development
Java development at Plugged In is done completely under Linux, with testing done on various platforms including Apple Macintosh, Windows 3.11, Windows 95, Windows NT 3.51 and 4.0, as well as various version of Unix, including Solaris. Linux servers make this cross platform testing easy, as it is easy to serve files via SMB (for Windows), NFS (for Unix) and Appletalk (for Macintosh). When testing, it is simply a matter of configuring the network on the machine, and mounting the files via whichever method is appropriate. Linux's support for different filesystems and methods allows easy integration to make a heterogenous network.
Linux was chosen for our company mainly because of the options it allows. It allows the choice of which editor to use, emacs, vi, or any other, or which Java virtual machine to use. Version control is also very important, as it allows rollback and logging of changes made. It gives the ability to script in perl, shell, and / or expect to facilitate development by automating many of the repetitive tasks necessary in development.
There are many GUI development tools available, but these are not, in general, used. Although pure Java development environments are available for Linux, they are not used at Plugged In because developers tend to prefer the faster vi / shell environment.
Due to some licensing issues the JDK (Java development kit) on Linux is always behind the Solaris / Windows version due to the fact that there is no vendor for Sun to deal with. A recent addition to Java on Linux is a reliable Just In Time (JIT) compiler, which speeds up execution time.
Development, in any language, pushes the envelope of a machine / OS, due to having to test extremes of the program. Linux handles the pressure well - it is stable, scriptable, and a user level process can't crash the operating system.
Linux on the desktop
Linux has come a long way from the early days, when it was solely for hackers. Nowadays, there are many well designed applications for it, ranging from commercial to freeware. It is now really starting to come into its own, as the OS is stable enough, and the underlying programs are advanced enough, that development is being done into more GUI-oriented programs such as AfterStep, GNOME, GIMP and many others. Although Linux still needs a technical user to some degree, this is slowly becoming less and less so, with distributions such as RedHat and windowing environments such as KDE, CDE, Afterstep, etc. A properly designed X-Windows environment is as easy as, if not easier to use than Windows 95, but is certainly more powerful.
Applications are still an area where Linux is lacking but this is slowly changing, as more commercial and freeware applications are being released for it. Applixware, released by RedHat, and Star Office are but two examples of fully functional office-style suites, with word processor, spreadsheet, etc. A Photoshop-style graphics manipulation program, called GIMP, has recently reached version 1.0, with many hours of development put into it by developers from all over the 'net.
The main advantage of Windows has always been applications, and there are many methods of running these under Linux. Freeware products such as Wine, Bochs and Dosemu are part-way towards a free product which would allow these applications to be used, and Wabi and SoftWindows are the commercial counterparts.
Program |
URL |
GNOME |
http://www.gnome.org |
GIMP |
http://www.gimp.org/ |
AfterStep |
http://www.afterstep.org/ |
KDE |
http://www.kde.org |
Wabi |
http://www.caldera.com |
Applixware |
http://www.redhat.com/products/product-details.phtml?id=apx |
Another advantage of Linux on the desktop is its customisability. There is a wide range of window managers available which allow the user to choose an environment to work in that they are familiar with. Each user has their own setup, and can change it as they wish.
Linux on the server
There are many advantages to running Linux on a server. It is incredibly easy to administer remotely, as networking is integrated into the operating system. Also, running Linux on both the server and desktop means a consistent environment across all machines, which makes it much easier to administer. The ability to automate many tasks via scripting, be it in perl, shell, or whatever, also is a huge advantage.
Flexibility is also an advantage, as it allows you to run whichever server you want - there are many choices for mail, news, proxy and web servers, many of which are free. As there are many people using and developing these servers, bug fixes are done quickly. Support for the servers are good as well, as many web sites, mailing lists, and newsgroups are available.
Program |
Use |
URL |
Sendmail |
|
http://www.sendmail.org/ |
Majordomo |
Mailing List |
http://www.greatcircle.com/majordomo/ |
LWGate |
Mailing List |
http://www.netspace.org/users/dwb/lwgate.html |
Bind |
DNS |
http://www.isc.org/bind.html |
Apache |
Web |
http://www.apache.org/ |
Squid |
Proxy |
http://squid.nlanr.net/Squid/ |
Inn |
News |
http://www.isc.org/inn.html |
Linux also has true multitasking, which is absolutely necessary for a server, as it means you can run multiple services on a machine easily. Stability on Linux has always been a concern for many people, but with reports of over a years uptime, and personal experience of greater than 220 days uptime, it is no longer so.
Initially, there was only one server, and it was running Solaris. As the business grew, more servers were added, which were all Linux. Recently, the last Solaris server, which was running Solaris and Netscape Enterprise server was replaced by a Sparc Linux machine running Stronghold. Performance has increased after the change-over from Solaris and Netscape Enterprise Server. The router is running Linux, and is the only server that is an Intel machine. The mail server, which runs sendmail, is also a Sparc machine. All of the servers handle the current load extremely well, which means there is room for expansion.
Linux in the Office
Originally, all the machines in the office were running Windows NT, and the servers were Solaris. After adding bash, NTEmacs, and various other Unix-like apps to Windows to get the desktop to where it needed to be, they were basically slow Unix machines that crashed a lot. Linux has been maturing gradually, and gaining more applications and is slowly getting ready for use in a commercial office environment.
Most of the machines in the office are running xdm, which gives a graphical interface to the login screen. The window managers used are AfterStep and KDE, with a default environment to allow non-technical users to use it effectively. The home directories are NFS mounted, which means anyone can log on from any machine and get the same environment. All the machines can see the files, no matter what OS they are in - by NFS when in Unix, by SMB when in a Microsoft OS, and Appletalk for Apple Macintosh.
When using Linux, it is very easy to use the different machines remotely, and to fix configuration problems without annoying the user - this means all the machines can be administered from one location. It is also a consistent environment, so is easy to administer, and means no confusion when switching machines.
There is a fileserver, which shares all the files by NFS and SMB, as mentioned before, which allows access no matter what OS the client machines are in. It also runs Apache, for the internal intranet which includes information about clients, a sysadmin area with information about the machines and procedures. This is also the mailserver, which pops the mail off the external mailserver using fetchmail, and allows all the employees to pop the mail down to their home directories. The time on all the machines is synced to the main server, which is then synced to an external time source, using xntp.
Backups are done using tar, and then copied across the network to a "backup" machine which has a tape drive. There is a weekly full dump of the data done, and then incrementals every other day of the week. At the start of every week, a tape is written with one week's worth of data, and this is then taken off-site. This backup strategy allows easy recovery of data, but also the security of having an off-site backup if something catastrophic were to happen.
This environment is expandable, secure, flexible, but most of all, useable. All the components are done in Linux easily and for free. The hardware used is all Pentium class machines.
Conclusion
Due to its ability to run on multiple platforms, and do so efficently, it is a good way of revitalising old hardware, and making the most out of exisiting resources, which is important in a startup company. This allows more to be done with existing resources, and to work more efficently.
There are a couple of minor problems, such as support for non-technical users, but this is slowly becoming a non-issue as the environment matures. The network has expanded dramatically over time, as Linux proves to handle it well, and as more and more services have been added.
Linux in a commercial environment works. As an internet server, it is stable, secure, and can run everything necessary to provide any services desired. The office network is a stable, expandable architecture, which fulfills the requirements of a startup software development and consulting company well, and it all runs under Linux.