Linux in Government: Optimizing Desktop Performance, Part II
As we discussed in last week's article, for most of its existence, people have distributed Linux as a workstation or a server rather than as a desktop. The default workstation that evolved has existed mostly for use by developers. So, when you install a Linux distribution with a graphical interface, it generally looks like what a developer might want. In addition, it performs similar to how many UNIX workstations work, which can seem slow.
In this article, we continue to look at the Linux desktop in a different light. Here, we think of it as a computer system with a fast interface that we can optimize for the knowledge worker and consumer.
Many points exist in a PC where an operating system can slow down. The most common point for this to happen lies between random access memory (RAM) and the hard drive. Similar to increasing the amount of RAM in your computer, you may find that purchasing a better hard drive can improve your performance. Follow the discussion below, and you should see why you may need a better hard drive.
By enabling Direct Memory Access (DMA), data can transfer directly from a hard drive's buffer to the computer's main memory, leaving the processor uninvolved. Although the results vary depending on the devices in your PC, using DMA should improve performance. You should try this to see if you experience improvements in disk performance. Please refer to Figure 1.
Most Linux distributions set the using_dma option to 1, and the Linux kernel normally sets DMA automatically. I discovered that in my system the flag was set to 0, which meant my using_dma option was off. Take a look at the top of Figure 1 which represents where I tested my hard drive parameter.
When I ran the command hdparm -t /dev/hda, my disk read 24MB in 3.11 seconds, which does not provide for the best disk access. So, I turned on using_dma using the hdparm -d 1 /dev/hda command and found that my disk access increased from 24MB in 3.11 seconds to 140MB in 3.01 seconds. You can see the results in the gray area of Figure 1.
Simply turning on using_dma enables a 16-bit mode, so I switched to 32-bit mode and found that my read time improved slightly. My buffered disk reads went from 46.50MB per second to 46.52MB, not much of an improvement. I also looked at turning on multiple sector I/O. This is a feature of modern IDE hard drives that permits the transfer of multiple sectors per I/O interrupt rather than the usual one sector per interrupt. When this feature is enabled, it typically reduces operating system overhead for disk I/O by 30-50%. On many systems, it also provides increased data throughput of anywhere from 5% to 50%.
I then ran the command hdparm -m /dev/hda and saw the following result:
/dev/hda: multcount = 16 (on)
But my buffering slowed down:
138 MB in 3.02 seconds = 45.72 MB/sec
In Fedora Core 3, you can change hdparm parameters in the /etc/sysconfig/harddisks file by uncommenting values. However, unless you see a significant improvement, don't make any changes. Simply buy a better hard drive.
Window frame image files can slow down system performance depending on the technique a theme maker uses to draw a frame. In GNOME, for example, the Crux window frame option loads slowly depending on CPU resources. In the system I used to test, I used a Sempron 2200 with a clock speed of 1.5GHz. To reduce CPU usage, I changed my frame options and noticed an increase in application start-up speed. For example, I downloaded and installed a theme called Atlanta and ran:
# gconftool-2 --type string --set /apps/metacity/general/theme Atlanta
I also could have changed the window frame by using Launch->Preferences->Theme and selected Theme Details. Then I could have selected the Window Border tab, clicked on Atlanta and closed.
Although themes use is subjective and people like to select their own eye candy, enterprises tend to want to get the best performance possible. You might try different combinations of theme elements to see if you find a difference in performance.
When you log in to a GNOME desktop, you see a splash screen, which displays icons and takes up time. I turn off my splash screen in order to reduce CPU cycles and because I find it annoying. If you have limited resources, you can use this command to save CPU cycles or get rid of the splash screen if you find it annoying:
# gconftool-2 --type bool --set /apps/gnome-session/options/show_splash_screen false
Users also can get to the splash screen options by using Launch->Preferences->More Preferences->Sessions and then unchecking it in the first tab. See Figure 2 for a look at the Sessions options.
Notice that you have several options from which to choose in the Sessions tool. Later, we use the third tab, Startup Programs, to show you how to load a script to improve the start-up time for OpenOffice.org.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
|Working with Command Arguments||May 28, 2016|
|Secure Desktops with Qubes: Installation||May 28, 2016|
|CentOS 6.8 Released||May 27, 2016|
|Secure Desktops with Qubes: Introduction||May 27, 2016|
|Chris Birchall's Re-Engineering Legacy Software (Manning Publications)||May 26, 2016|
|ServersCheck's Thermal Imaging Camera Sensor||May 25, 2016|
- Secure Desktops with Qubes: Introduction
- Secure Desktops with Qubes: Installation
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- CentOS 6.8 Released
- The Italian Army Switches to LibreOffice
- Linux Mint 18
- ServersCheck's Thermal Imaging Camera Sensor
- Working with Command Arguments
- Chris Birchall's Re-Engineering Legacy Software (Manning Publications)
- Petros Koutoupis' RapidDisk
Until recently, IBM’s Power Platform was looked upon as being the system that hosted IBM’s flavor of UNIX and proprietary operating system called IBM i. These servers often are found in medium-size businesses running ERP, CRM and financials for on-premise customers. By enabling the Power platform to run the Linux OS, IBM now has positioned Power to be the platform of choice for those already running Linux that are facing scalability issues, especially customers looking at analytics, big data or cloud computing.
￼Running Linux on IBM’s Power hardware offers some obvious benefits, including improved processing speed and memory bandwidth, inherent security, and simpler deployment and management. But if you look beyond the impressive architecture, you’ll also find an open ecosystem that has given rise to a strong, innovative community, as well as an inventory of system and network management applications that really help leverage the benefits offered by running Linux on Power.Get the Guide