Archive for the ‘Computing’ Category

KDE4 on Gentoo

Friday, May 16th, 2008

So I bit the bullet and installed KDE 4.0 on Gentoo. Version 4.0.4 recently hit the tree, and with some minor hackary to package.unmask and package.keywords I have a nice spartan KDE 4.0.4 desktop that I am typing this in.

My observations:

Like Gentoo’s KDE3 packaging, you are given KDE4 pretty much as it is packaged upstream. It certainly lacks the polish that Fedora 9 and OpenSUSE 11 have been able to apply.

The desktop is somewhat of an afterthought at this point. Basic icon grid alignment and drag selection don’t work. Icons on the desktop are treated as widgets which means you can rotate them and such which may be something to build on in the future. However this area basically needs work.

Oxygen is beautiful. Seriously, everything looks stunning and it does not get in the way. Its not gaudy. Very professional. Still room for improvement though, I.E. icon set isn’t complete, consistency.

kwin’s built in composting is awesome. This is exactly the kind of thing I’ve been waiting for. It doesn’t have the heavy weight and gaudy appearance of Compiz or Vista. This will be a major productivity boost. Tabbing through windows, expose-zoom overview, and a heads-up of virtual desktops are the things I will use. The light shadowing and animation are also refreshing and professional. Nothing to get in the way here, it is stable and speedy.

The application launcher is a major pain in the ass. The integrated search is handy, but it just takes too many damn clicks to find an app otherwise. This will be especially unwelcome by new users since you might not know if the app you want is in ‘Internet’ or ‘Development’ or ‘Multimedia’ or even ‘More Applications’ under any of these. Every time you click the menu it starts from the favorites pane and does not remember the category you were in. I don’t think the Windows 95 style start menu is the final or best UI answer, but it beats this Vista style menu and the OS X dock abomination hands down.

Basically, plasma as a whole needs work. Widgets seem pretty glitchy. Also responsible for the above desktop nuances.

Apps are hit or miss. Gwenview is great for thumbing through pictures. okular does the same for documents. Dolphin works very well for most tasks, while Konqueror is there for you otherwise. Many of the games have been updated and are pretty good. Marble, Kalzium - just plain cool. Ark was one of my unsung heros on KDE3. It is severely lacking in KDE 4.0. I hope that it gets some attention, and shell integration back too! A lot of other utilities are either absent or need work as well.

Amarok 2 has yet to be released, but this will be a major influence when it is.

Speed! KDE4 is quick. This is a welcome relief. Once KDE4 starts to gel, I’d imagine it will run at least as well as KDE3 on old hardware. Build speed was much quicker with cmake, which is very welcome on Gentoo.

Stability is much improved in this release. It still is not business-grade. Trivial apps seem to crash on exit and such.

The Weird? The default window size for just about everything seems unnecessarily small. I find myself having to resize pretty much everything before I can use it.

In conclusion, KDE 4.0 is a giant leap forward but it is a work in progress…

If you are migrating from KDE3 on an old install, best wait as there is some adjustment. KDE 4.0 as packaged in Fedora 9 and OpenSUSE 11 seem quite usable however. I wouldn’t hesitate to install them on a new PC. I will certainly keep KDE 4.0 installed and re-evaluate with 4.1, but KDE3 has a better work flow for my use at the moment.

It reminds me a lot of Apple’s OS 9 to OS X transition. I’ve been following the development for some time. From the alphas, betas, and release in January, I’m quite surprised by where we are at today. Things are much better than they were just six short months ago. A lot of work has taken place and we are really forging the foundation for a first rate competitor in the PC desktop arena for the next 10 years. KDE 4.1 should be be released near the end of the summer. I believe it will be enough to convert many KDE3 users over. Things should really calm down and align by 4.2 and it will no doubt in my mind be the best desktop environment whatsoever at this point.

Fedora 9, KDE 4.0 done right

Tuesday, May 13th, 2008

Wow!

I just downloaded the Fedora 9 KDE live spin.  I am impressed.  I tried a few of the betas along the way, but this is very polished.  Much better than Ubuntu’s try at KDE4.

It feels  very responsive and works very well, even as a LiveCD under VMWare.  This is KDE4.0 done right.  I’m banking on OpenSUSE 11 having an even better build from the betas I’ve seen.

By KDE 4.1’s arrival, I imagine KDE will be ready for prime time and most users will be able to migrate over.

But all in all, if you want a nice Linux desktop right now, Fedora 9 seems to have hit it pretty well.

My thoughts on software and complexity

Thursday, June 28th, 2007

My thoughts on the growth of the Linux kernel and the status quo of using and developing software..

Prompted by discussion of this article: 1986 Mac Plus Vs. 2007 AMD DualCore. You Won’t Believe Who Wins

[Ed: My response to accusations of Linux Kernel bloat]

The [Linux] kernel never has really been the problem. In 1 to 2 MB of compressed/compiled code on my computer (gentoo-sources + my custom .config and a couple of patch sets from future merges), there is some of the most advanced file system, networking, protocol, hardware and scheduling code ever conceived. Indeed, there are many areas that need work and are constantly being updated, but find me a kernel that supports NUMA, scales quite linearly with SMP, implements fair queuing of IO and CPU scheduling, has NO tick interval, virtualization and supports a wide gamut of platforms and hardware. It runs on systems as small as a microcontroller and as large as BlueGene/L. Did I mention it is free and I can learn from and hack on it?

The kernel isn’t really expanding at a rate to be concerned with, because only a small subset ends up being needed for most users and systems. No, the problem really lies in user space on UNIX systems. Modern UNIX userland involves many many layers of programs interacting and building on top of each other. I really don’t see it getting better in the future either. As higher and higher levels of programing languages are being used, more and more layers are added to the onion. This can make a programmer’s life easier and allows more complex systems to be designed, but there are many drawbacks as well. Bug creep, feature creep, usability, complexity, and resource usage all come to mind.

Do I know the answer? Not at all. I don’t think there is one. Software will develop organically in the wake of hardware progress for the foreseeable future. If and when this progress slows, perhaps things will change course. A sea change of compiler optimization, small is beuatiful engineering, and an emphasis on efficiency..

I Love IBM

Sunday, June 3rd, 2007

Just taking a moment to express my appreciation for IBM. Yes, I’m a bit of an IBM fanboy.

POWER6 is geared for release, and it’s badass. Check out this Ars Technica article for a good run down:
IBM’s POWER6 flies the coop at 4.7GHz

Simply put, IBM is the only company competing with Intel on Silicon process technology. IBM is part of an alliance with Freescale, Chartered, Samsung, AMD and others so their innovation can and will trickle down to the consumer market.

This is what I’m talking about:
Made in IBM Labs: 10 Chip Breakthroughs in 10 Years

Thank you.

Gentoo 2007.0 Released!

Monday, May 7th, 2007

“The Gentoo project is pleased to announce the much-delayed release of Gentoo Linux 2007.0. This release met with several delays due to an abnormally high number of security vulnerabilities in large packages which had to be rebuilt using the newer, secure versions of the packages.” A new installer, and much needed install media bumps round this one out.

read more | digg story

Linux Kernel 2.6.21 and Tickless Kernel (CONFIG_NO_HZ)

Thursday, April 26th, 2007

So Linux kernel 2.6.21 is finally out and all the buzz is about the Tickless Kernel patches. Wanting to drink the kool aid, I downloaded the freshly released gentoo-sources. Unfortunately it looks like amd64 support has not yet made it in.

I pulled some numbers on my main workstation, a dual Opteron machine. The first command lists the number of interrupts. You’ll notice that the ‘timer’ interrupt is primarily firing on CPU1. Below this is the output of `sensors`. Here you can see CPU1, again which ‘timer’ is firing, is running about 13°F higher than CPU0. These numbers are pretty consistent when I let the machine idle, so I am going to postulate that the timer interrupt is responsible for the thermal difference. It will be interesting to revisit the issue once amd64 support is added to CONFIG_NO_HZ, and I will post as soon as the results are in.

kev009@kev-ws-amd64 ~ $ cat /proc/interrupts
CPU0 CPU1
0: 969 9294483 IO-APIC-edge timer
1: 10545 28 IO-APIC-edge i8042
6: 0 3 IO-APIC-edge floppy
7: 0 0 IO-APIC-edge parport0
8: 0 0 IO-APIC-edge rtc
9: 0 2 IO-APIC-fasteoi acpi
12: 5 127 IO-APIC-edge i8042
15: 276725 718 IO-APIC-edge ide1
16: 746315 1666 IO-APIC-fasteoi ehci_hcd:usb1, nvidia
17: 59746 5990 IO-APIC-fasteoi libata
18: 282186 1581 IO-APIC-fasteoi ohci_hcd:usb2
19: 0 0 IO-APIC-fasteoi ohci_hcd:usb3
26: 280054 128 IO-APIC-fasteoi EMU10K1
28: 355905 111 IO-APIC-fasteoi eth0
38: 0 15 IO-APIC-fasteoi aic79xx
39: 160124 1762 IO-APIC-fasteoi aic79xx
NMI: 2068 1916
LOC: 9294591 9294562
ERR: 0
kev009@kev-ws-amd64 ~ $ sensors -f
k8temp-pci-00c3
Adapter: PCI adapter
Core0 Temp:
+120 F

k8temp-pci-00cb
Adapter: PCI adapter
Core0 Temp:
+133 F

My x86 server was a bit more evenhanded with its interrupts, so I can’t do a thermal comparison like the above. So throwing caution to the wind I compiled a pair of 2.6.21 kernels: one with CONFIG_NO_HZ and CONFIG_HIGH_RES_TIMERS, and the other without. Armed with a kill-a-watt meter, its time to see if there is any empirical evidence on power usage.

Tickless/High Res: 98-101 ~100VA

250Hz Tick/”Low Res”: 99-103 ~102VA

With this hardware (IBM x330, dual 1GHz PIII, ServerWorks OSB4 chipset) I see about a 1-2 volt-ampere average drop.

I’d be interested in seeing others results, particularly on mobile hardware. Many laptops have a current discharge sensor that could be used to monitor and measure the difference. I suspect that the difference would be more noticeable if you run a 1000Hz tick as well. Please leave a comment or trackback with your thoughts and results.

Building NAS, Part 2

Sunday, April 15th, 2007

Building your own Network Attached Storage server

In an earlier post, I discussed what was necessary to cable 1U servers up with power to run SATA drives. Next, you’ll need some drives and a controller if you have not already purchased them.

Controllers

The SATA controller you select is one of the most important pieces of the NAS box. It is my recommendation you get a high quality card, even if you are just doing RAID-1 (Mirroring). There are basically three types of controllers: standard, fakeraid, and hardware RAID. A standard controller is just a host-bus adapter. Any advanced features like striping and mirroring will need to be performed by your OS. Fakeraid includes a RAID BIOS, but all processing is left to a software driver. Hardware RAID is a complete subsystem with a dedicated CPU.

Standard controllers and fakeraid cards are generally cheap and maybe even integrated on your motherboard. However, these are rarely a good choice for servers. Aside from requiring the host to perform a lot more work, these can also cause a lot of trouble down the road. For instance, if a hard disk fails with software RAID, the system may not be able to reboot without intervention. Fakeraid may present the disks to the machine as one logical disk to avoid this, but these cards are the most evil. They tend to use closed drivers and proprietary disk formats which basically means avoid these like the plague. The cards themselves are fine, just use them like a standard controller and use the software RAID of your operating system. That leaves us with hardware RAID controllers.

Hardware RAID controllers are the only logical choice for a server. Hardware RAID cards offload all RAID processing to a subsystem on the card. These cards have an integrated CPU to perform parity calculations for RAID-5, and usually a large amount of RAM to act as cache. The RAM can even be used as write cache, but it is important to have a battery ON THE CARD in case of a power failure or crash to avoid potentially much greater data loss. Hardware RAID controllers present their RAID volumes as logical disks to the computer and operating system, so faults are transparent to the host. They also tend to allow hot addition of storage. Finally, since the card is handling all the I/O, bandwidth requirements are heavily reduced. If I am writing to a hardware RAID-1 device, data only needs to be sent across the PCI bus once as opposed to software RAID which will need to write the data to each disk. This is a very important consideration for older machines that have limited bus bandwidth and large arrays.

All things considered, I went with a 3Ware 9500S. Cost: $100 on eBay.

3Ware 9500S

3Ware has good drivers in the Linux kernel, and has been manufacturing SATA RAID controllers for some time. Other decent manufactures are Adaptec and LSI Logic. Be sure to check for OS compatibility before purchasing a card.

Hard Drives

Just because you are getting the price point of SATA, you should not disregard the quality of drives you are purchasing. Although most standard consumer drives will work fine, there is a much more attractive option. Seagate and others offer what they call “nearline” drives which are basically the consumer drives with a RAID friendly firmware and continuous duty cycle. What’s best is that these usually only have a $10 or so premium over their consumer counterparts. When it comes to selecting a manufacturer, take a look at the warranty and technology integrated in the drives. Seagate and Hitachi are both good choices. Take a look at reviews too, especially StorageReview.

When most people purchase a hard disk, they make their choice simply on size. For a server (and even desktop!), you should also consider the spindle speed and size of the drive cache. 7,200RPM is enough for most servers, but 10,000RPM will deliver far greater performance under concurrent and random access. Of course, these usually come at a a heavy price premium and lesser capacity.

Here, I went with a pair of nearline Seagate Barracuda ES drives. The 320GB model was ample for my need, but these go all the way up to 750GB. They use perpendicular magnetic recording which increases density and speed, and feature a large 16MB cache. My initial testing shows nearly 80MB/s throughput! That level of speed has traditionally only been available on expensive SCSI disks. Cost: $100/drive.

Seagate Barracuda ES 320GB

Networking

Equally important to a NAS server is ample networking bandwidth.  This is largely dependent on the scale of services, but a decent gigabit NIC should get you near disk performance.  I picked up an Intel Pro/1000 MT Server Adapter, which features various offloading schemes to free the host’s CPUs from networking tasks.  If your needs are greater, consider aggregating several gigabit ports together.  Cost: $20.

Final Thoughts

The total cost for storage hardware comes to about $320.

Cabling the drives up and configuring the array is a pretty straight forward task. If you chose software RAID, there are plenty of guides on the internet to assist you in setting up md and device-mapper. Try http://linas.org/linux/raid.html.

When it comes to RAID levels, the choice depends on the number of drives you have and the level of protection you need. RAID-1 is a great choice for most applications in that you get true redundancy and greater read performance, but at the cost of half the physical capacity. RAID-5 is also commonly used in which you lose the capacity of one drive, with a three drive minimum. It allows for the failure of a single drive. With the size of modern hard disks, RAID-5 is less attractive than it once was and also suffers from heavy write performance loss due to parity calculations. Try http://www.acnc.com/04_01_00.html for the lowdown on various RAID levels.

My next post will cover file system selection.

IBM NetVista 2800 Hacking

Thursday, March 29th, 2007

Similar to the x330 SATA mod, I have some NetVista 2800s that I need 5v/12v accessory power from. I’m doing some experimentation with the Asterisk open source PBX and wanted to interface with the house phone lines. I purchased a Digium TDM400P for this task.

Digium TDM400P

This is a modular card, with up to 4 lines. Any combination of FXO or FXS modules can be used. FXS modules to interface with analog telephones require 5v/12v power. The NetVista 2800 has a 4 pin power header, labeled “Hardfile Power” at J11.

NetVista J11 hardfile power

The connector we need this time is a Molex 43025-0400. Here’s the pin out:

NetVista 2800 Power Connector

I also found an IBM part for the xSeries 300. Note that this is not wired correctly for either the x330 and Netvista 2800. It will require reworking for both application. FRU 24P0622:

xSeries 300 Hard Drive Power

And that brings me to my final point. I found a really cool product today that would be useful for both the NetVista and 1U servers.

UpgradeWare HD25-I

It takes power from the PCI bus to power a 2.5″ notebook hard disk. There are a few different models with different SATA and PATA connection combos depending on your needs. The fact that this product uses a PCI slot is its greatest advantage and disadvantage. PCI slots are usually scarce on machines where this would be useful. None the less, at around $25 it is basically the same price as the IDE adapter you would otherwise need to use a notebook drive in a desktop machine.