Discover and share the best of the web!
Learn more about Digg by taking the tour.
A Three Pronged Attack to Increase Linux Performance
linux.com — "A computer running Linux can outperform the same computer running Windows XP or Vista. Even so, you may be able to make your Linux system even faster. Here are three optimizations, at different levels, that can make your Linux system perform better."
- 731 diggs
- digg it
- searayman, on 10/11/2007, -11/+8definitely some great tips in here!
- Stoical, on 10/11/2007, -11/+11Yep, some useful stuff, although i always wince a little when i read: "Linux can outperform the same computer running Windows XP or Vista" While i agree to a certain extent i still feel that XP and Vista offer big advantages over Linux. The main one being useability. If your a switched on Power user then getting the most out of linux is great, but for your average Joe XP and Vista are superior because they are simply easier to use and more user friendly.
Comments like this also make me wonder: "As with all optimizations, you won't be able to tell whether you are really getting better results without doing some simple benchmarking." So is this suggesting that under normal use i wont notice the optimizations? I mean if your goal is to beat last weeks benchmark results then cool, but surely you would be using your OS for more productive tasks, and if an optimization doesnt provide a noticeably better performance increase is it worth the effort?? Dont get me wrong, I am an advocate of Linux and Open Sauce, but i prefer to use Linux for the tasks that it excels, my back end infrastructure i.e. my servers.
Until Linux can match Windows for pure useability from an average Joe's perpective i will continue to use Windows boxes for my users. The latest generation of Linux Desktop distributions have made a giant leap forward, but have some way to go. I look forward to the day Linux can match MS for ease of use, it wont be long i'm sure. Good tips for the power user though.- malkir, on 10/11/2007, -2/+5"As with all optimizations, you won't be able to tell whether you are really getting better results without doing some simple benchmarking." This is a statement of fact no matter what system you are running. Just because you _think_ you are getting better/worse performance doesn't mean you actually are. The only way to know is through benchmarks.
- Stoical, on 10/11/2007, -5/+2I accept that, but surely if the performance gains are not noticeable to the user then is there any point? I can make minor tunes to my car to get some extra speed out of it, but really would i notice an extra 3 or 4 MPH without looking at my speedo? I would much prefer my car to be comfier (easier?) to drive, than 3-4 MPH speed gain. I think Linux would be better served with articles looking at how useability can be imporved.
I think the article is well written and gives power users some great tips, it's just I wish the linux devs would push more in the useability stakes for normal users. This would mean as a system engineer i could harness the performance of Linux throughout my networks and not have to sacrifice useability. I know for a fact that if i tried to get the majority of my users to use a Linux desktop distro they would complain to high heaven.
I recently rolled out Ubunutu to a few of my users who seem to be getting on OK with it, but my support team still get many more queries relating to Ubuntu than they do for XP and Vista, and usually it's related to being able to do tasks that are simple to perform in a windows environment. Sure more training could go some way to resolve this, but is it worth the extra cost involved to train 1000+ users to use Linux?
I'm hoping one day the gap in terms of useability will be insignificant between Linux and Windows. It's coming, but there is a way to go yet. - malkir, on 10/11/2007, -0/+5Different != less usable. At this point any usability issues arise from a lack of familiarity. I personally can't think of specific tasks that an average user would need to do on a computer that can't be done just as easily on linux as under windows. This is, of course, assuming someone set it up properly in the first place.
Also about the performance issues. The hard-drive is the biggest bottleneck in performance for PCs if you can get an 11x performance increase out of it you're doing really well. - Stoical, on 10/11/2007, -4/+1" This is, of course, assuming someone set it up properly in the first place." Please give me a break. We are not talking about the system failing here, we are talking about basic useablity of Linux. Sure someone that has spent time learning how to use Linux and has had the opportunity to build large scale multi user environments with Linux will have a good understanding of how it works. What about your average Office Worker that has Windows on their home PC has grown up with Windows and knows nothing else? Surely it would be better for Linux desktop distro's to adopt useability conventions that have been created and learnt over many years from experience with Windows, whilst retaining the performance and security of Linux and not to mention all the advantages of it being an Open Source OS. On one of my systems I have 100 users on Linux, but its a cut down linux OS on a bunch of Thin Clients connecting to a Linux backend including a Virtualized Windows Citrix farm. I get the performance and security of Linux and the users get the familarity of Windows, this for the time being seems to be a good compromise.
- malkir, on 10/11/2007, -0/+3By "set it up properly in the first place". I was talking about usability, not stability. An average user needs their printers, their email, and their companies file share, along with their own files. IT staff have to set this up for Windows users anyway so setting it up for a Linux user would only impact them. What you are basically asking for is for some Linux distribution to copy windows and put all the menus in the same spot. IANAL but I'm betting you could get in some serious trouble for doing that.
The only issues with moving a normal company from Windows to Linux would be educating users about file types. And the occasional program that has no decent replacement in Linux (i.e. Quickbooks).- mancat, on 10/11/2007, -3/+1Occasional program? With the exception of very small businesses, many make use of specialized applications that have no comparable replacement available in Linux. Things like OpenOffice are still not a drop-in replacement when your office staff has been trained to use Office or WordPerfect, or has years of experience under their belt using these applications. Throw OpenOffice in front of the average secretary and she will be completely lost.
One legal office I worked with gave it a shot. We put OpenOffice on every machine. The staff was terrified of it and wanted WordPerfect back within a day or two, even after we gave them "cheat sheets" that compared WordPerfect functions to OpenOffice Writer functions.
The company I currently work for could never in their wildest dreams migrate to Linux. Too many specialized applications, too many macro-based forms that depend on Excel, Access, InfoPoint, etc. Fortunately, there's no need to move to Linux, as everything works extremely well on Windows XP and Server 2003. Shocking, I know!!! - malkir, on 10/11/2007, -0/+3All of those issues are social issues; people weren't willing to learn, it's not that the software on Linux couldn't handle their business processes. The specialized applications will most likely end up bogging down the organization sooner or later, they typically do. When you need to many macros in excel it's usually time to move to a real database, same goes for access, most access databases usually outgrow themselves. I'm not here dissing Windows, I use it for most of my work and like it just fine, I'm just arguing against what I perceive as flawed arguments.
- mancat, on 10/11/2007, -3/+1Occasional program? With the exception of very small businesses, many make use of specialized applications that have no comparable replacement available in Linux. Things like OpenOffice are still not a drop-in replacement when your office staff has been trained to use Office or WordPerfect, or has years of experience under their belt using these applications. Throw OpenOffice in front of the average secretary and she will be completely lost.
- Stoical, on 10/11/2007, -1/+0I'm not asking any linux distro to copy windows, but to come a bit closer to the ease of use associated with windows would be good. From my point of view, using thin clients running linux connecting a linux back end + virtual windows/citrix back ends gives us the ability to scale our infrastructure, have great security and performance and also the users are not too fussed as they get a mainly windows experience. What i would like is for more home users to have a Linux desktop, but this simple wont happen until Linux comes more to masses and makes it easier to do simple tasks like installing and uninstalling software, and pressuring software companies to make more software compatible with linux.
All i'm trying to say is that Linux needs to be much more noddy point and click than it is at present for it to be accepted by the mainstream.
- Stoical, on 10/11/2007, -5/+2I accept that, but surely if the performance gains are not noticeable to the user then is there any point? I can make minor tunes to my car to get some extra speed out of it, but really would i notice an extra 3 or 4 MPH without looking at my speedo? I would much prefer my car to be comfier (easier?) to drive, than 3-4 MPH speed gain. I think Linux would be better served with articles looking at how useability can be imporved.
- stormgren, on 10/11/2007, -0/+13"Dont get me wrong, I am an advocate of Linux and Open Sauce"
Mmmmm, open sauce.
- malkir, on 10/11/2007, -2/+5"As with all optimizations, you won't be able to tell whether you are really getting better results without doing some simple benchmarking." This is a statement of fact no matter what system you are running. Just because you _think_ you are getting better/worse performance doesn't mean you actually are. The only way to know is through benchmarks.
- Stoical, on 10/11/2007, -11/+11Yep, some useful stuff, although i always wince a little when i read: "Linux can outperform the same computer running Windows XP or Vista" While i agree to a certain extent i still feel that XP and Vista offer big advantages over Linux. The main one being useability. If your a switched on Power user then getting the most out of linux is great, but for your average Joe XP and Vista are superior because they are simply easier to use and more user friendly.
- rabidstrike, on 10/11/2007, -8/+3emulated SCSI doesn't do justice to the drive.. anyone care to help me out with my "dev/sda"?
- nyx210, on 10/11/2007, -1/+14There are other Linux sites that can give you better help than the answers that you'll probably get on Digg.
- scabbers, on 10/11/2007, -23/+6"A computer running Linux can outperform the same computer running Windows XP or Vista."
If you have to resort to the command line to turn on DMA disk transfers, I'll take that "fact" with a big chunk of salt.- DavX, on 10/11/2007, -4/+2I guess it doesn't make it any less of a fact, it just makes it unobtainable for the casual user, which means it essentially isn't an advantage.
- leszek, on 10/11/2007, -0/+11All recent distributions automatically enable dma ...
This tip is unnecessary. - unsavory, on 10/11/2007, -4/+2I'd like to see Linux outperform Windows at post processing my photos in Adobe Lightroom and Photoshop.
- opiophile, on 10/11/2007, -39/+2HAHA LiNiX SUCZ!!!! So DO MAcS!!! XP for LIFe bitcHE3!
- 4DFX, on 10/11/2007, -2/+11That was like going to Baghdad and yelling: "ALLAH SUX ASS!"
- Chandon, on 10/11/2007, -1/+7That's a great idea. He should definitely go do that.
- 4DFX, on 10/11/2007, -2/+11That was like going to Baghdad and yelling: "ALLAH SUX ASS!"
- skidme, on 10/11/2007, -27/+2Jesus Christ...Until you can play quality games on Linux, I'm not ***** switching!
- ShadwDrgn, on 10/11/2007, -1/+5uh... you can.
- Chandon, on 10/11/2007, -1/+6skidme -
That's great. But... I'm not sure why anyone who would be in this thread would care. - OneAndOnlySnob, on 10/11/2007, -1/+5Skidme! Will you switch!!! Please, everyone is dying to know!
- aflury, on 10/11/2007, -2/+17"Linux records the times when files were created, last modified, and last accessed. The latter usually implies a penalty on file access, since even if you only read a file, the system will update the directory entry for the file to record the latest timestamp."
Ok so I'm pedantic... but this is false. The access time is stored in the inode, not the directory entry.- bjnord, on 10/11/2007, -0/+1aflury is correct (inode, not directory entry), but hagnar: Setting noatime when you don't need last access time does indeed give you a significant performance boost. I remember the FreeBSD folks recommending this to speed up "make buildworld" back in the day, and they were right.
- StringyLow, on 10/11/2007, -15/+1wow, you guys suck.
- johnnyrotten, on 10/11/2007, -7/+4cp * > /dev/null?
- netkid91, on 10/11/2007, -0/+5Ummm, you can't pipe output from CP.... How about: cat /home/user/reallybigfile > /dev/null
- complich8, on 10/11/2007, -0/+0sure you can pipe output from cp...
like, if you did "cp -v *.txt textfiles/. > list.txt"
it's sort of pointless without a -v though :p.
I like how that command overwrites whatever file is lexically last in the directory though. Makes you wonder if he even actually tried the command himself...
- complich8, on 10/11/2007, -0/+0sure you can pipe output from cp...
- redxii, on 10/11/2007, -2/+3rm -Rf /
- johnnyrotten, on 10/11/2007, -0/+0Interesting how I got dug down and "corrected" when all I did was to quote the article. I think the author meant to say "cat" rather than "cp", but none of you caught it.
- netkid91, on 10/11/2007, -0/+5Ummm, you can't pipe output from CP.... How about: cat /home/user/reallybigfile > /dev/null
- jabberwolf, on 10/11/2007, -12/+1THE POINT BEING, it can run some or many things faster.
Yes Vista and XP have many more apps and more collaboration out there but Linux out there like Ubuntu is pretty easy to use.
I'd opt for the combination of Ubuntu and Vista ( maybe XP too on the same machine) to have the OPTION of running anything I want.
So basically running Windows + Ubuntu can do a hell of alot more and faster then OSX and Windows... lol- jbhannah, on 10/11/2007, -1/+1Triple-boot for teh win.
- Chandon, on 10/11/2007, -1/+1> Yes Vista and XP have many more apps and more collaboration out there but Linux out there like Ubuntu is pretty easy to use.
There are some specific proprietary apps that Linux doesn't have, but I wouldn't go so far as to say that Windows has more apps - at least not in any method of counting that will produce useful results. - clickwir, on 10/11/2007, -0/+1wow. that has nothing to do with anything in this article
- johnnyrotten, on 10/11/2007, -7/+1cp * > /dev/null?
- DrBob, on 10/11/2007, -3/+2No, what you want is:
sudo rm -Rf /
Just put your password in, and you're laughing.- credence, on 10/11/2007, -0/+0rm -vrf / is more fun, then you can watch the files on your harddisk as they vanish forever.
- DrBob, on 10/11/2007, -3/+2No, what you want is:
- columbusgeek, on 10/11/2007, -2/+6deleted for me being dumb
- osirisx01, on 10/11/2007, -3/+4To me, tip one implies that linux cripples the hard drive, and pretty badly considering that the read speed gains a 10x boost just from changing a few settings.
- jbhannah, on 10/11/2007, -6/+1The settings are disabled by default because it *can* put a lot more strain on your hard drive. If your computer does things that have it reading to and writing from the hard drive at almost full speed almost constantly, then it'll wear it out pretty fast if you change the drive settings. But for everyday use, it doesn't have that much more an effect, and really does speed things up.
It's not that it cripples it; it's just as a precaution, because a lot of things Linux systems are used for--web servers, for example--do require very high amounts of disk activity, and if these settings were enabled by default, Linux web server uptimes wouldn't be much to brag about.- clickwir, on 10/11/2007, -1/+5uhhh no. These software settings don't make the hardware work harder. It simply changes the methods of communication to and from the hard drive. You can't type some commands and make your platters fly away.
Though most modern distros already set these automatically and/or have no need for them because they use different/better methods anyway. This guy is talking about getting 33MB/sec from his drive. I have an old Seagate 120gb SATA and it does 50MB/sec on Kubuntu Feisty with no tweaks. What the hell distro was he really running here? Slackware 4 on a Pentium II 333 with 64MB ram? - complich8, on 10/11/2007, -0/+2DMA is NOT bad for your disk. reading faster means reading in fewer passes, allowing IO operations to be more streamlined. PIO is more likely to pile up conflicting IO operations and keep the disk active, seeking and generally working for substantially longer. It's not like changing how the controller talks to the disk itself is going to change how fast the disk is rotating or how fast the read heads move.
The only reason PIO is the default is that linux supports ancient, ancient hardware that doesn't support DMA. DMA has been normal since like ATA/33 for IDE devices.
- clickwir, on 10/11/2007, -1/+5uhhh no. These software settings don't make the hardware work harder. It simply changes the methods of communication to and from the hard drive. You can't type some commands and make your platters fly away.
- Timmmm, on 10/11/2007, -0/+5DMA is on by default in most modern distros. 'noatime' doesn't make that much difference. Didn't read the rest - what a waffly article!
- EbilPhish, on 10/11/2007, -0/+1Also SATA drives have the improvements on (hdparm is IDE only).
Is IDE still sold much?
- jbhannah, on 10/11/2007, -6/+1The settings are disabled by default because it *can* put a lot more strain on your hard drive. If your computer does things that have it reading to and writing from the hard drive at almost full speed almost constantly, then it'll wear it out pretty fast if you change the drive settings. But for everyday use, it doesn't have that much more an effect, and really does speed things up.
- forceflow2, on 10/11/2007, -5/+17How did a story about Linux get to the front page without having Ubuntu in the title? Someone needs to record this moment in time.
- muszek, on 10/11/2007, -1/+4Just as I wanted to write that I wish there were tips like this for Ubuntu :)
- forceflow2, on 10/11/2007, -1/+2Can't decide if this is sarcasm or not...
- ispep, on 10/11/2007, -0/+1I'm sure you'll steal the article, change the title to "A Three Pronged Attack to Increase ubuntu Performance, and post it in your blog.
- ispep, on 10/11/2007, -2/+1I'm sure you'll steal the article, change the title to "A Three Pronged Attack to Increase ubuntu Performance, and post it in your blog.
- renegadeafk, on 10/11/2007, -1/+3Is Ubuntu faster than linux?
- muszek, on 10/11/2007, -1/+4Just as I wanted to write that I wish there were tips like this for Ubuntu :)
- trollick, on 10/11/2007, -14/+3"A computer running Linux can outperform the same computer running Windows XP or Vista."
And apples are much better than oranges. FACT.- idonthack, on 10/11/2007, -1/+4More like Linux apples run faster than Microsoft apples.
Also, oranges rule.
- idonthack, on 10/11/2007, -1/+4More like Linux apples run faster than Microsoft apples.
- erikerikerik, on 10/11/2007, -8/+2Meh, So you make the Operating system faster.
This dose not mean that the end user output will be faster?
-
A True end of the day test, would not be a benchmark. But more of the fallowing "test"
Take a OSX user and plop them down in front of the Linux and Vista computers and ask them to perform some task.
I'm willing to bet that recognition and recognition plays a bigger factor then simple tweaking.- complich8, on 10/11/2007, -0/+1There are two useful patterns of studies: "within-subjects" and "between-subjects". They're useful for different things.
You're effectively saying "within-subjects designs are useless, only between-subjects matters". But if you've ever sat down at a system with DMA disabled and tried to do anything substantial, you'd be quite well aware of the effects of doing so.
Seriously, PIO mode is horrible. But every distro around turns on DMA by default for IDE disks, as has been said. This has been the norm since the 2.6 kernel came out, and was not uncommon before that.
This article isn't saying "linux is better than windows if you do these things and not otherwise". It's saying "make the most out of linux". But because it's listing what on most systems is a default setting, followed by something that improves access performance by a fraction of a percent in the average case, followed by prelinking (which only makes much difference with huge apps and only at load-time), the article is fluff.
- complich8, on 10/11/2007, -0/+1There are two useful patterns of studies: "within-subjects" and "between-subjects". They're useful for different things.
- google01103, on 10/11/2007, -3/+1Question - anyone know a similar tutorial for sata drives? Or they are optimized already?
- complich8, on 10/11/2007, -0/+3SATA drives are in DMA by default. You can do other small behavior tweaks with smartctl on some disks, but not on others. Since SATA disks are fast becoming the norm, this article's about 3 years late to the party.
- Lick, on 10/11/2007, -5/+2Digg comments seldom contain positive feedback.
"Nice article." Whew. - ShadwDrgn, on 10/11/2007, -3/+5this is lame. the same hard drive optimizations can be made in XP/Vista, and getting rid of atime info is an idiotic move as security goes. not worth it.
- complich8, on 10/11/2007, -1/+1I don't get why you'd think noatime is a security risk. From an intrusion detection perspective, you only really care when a file was created and when it's modified. CTIME and MTIME give you that. Just about nothing uses ATIME for anything...
but you're right. In fact, XP and Vista both default to DMA enabled, with XP only going out of DMA if you've got a controller that has bad support in the default windows driver and no better driver installed. The other tweaks are for the most part pointless. - Megatog615, on 10/11/2007, -0/+1The readahead tweak gave my hard drive about .5MB/sec increase. The multcount tweak gave me nothing, and it's also potentially dangerous to use. Other than that, all the documented tweaks were already enabled for me. Maybe someone else will have better luck with the readahead tweak.
- drmsux, on 10/11/2007, -0/+1noatime:
fsutil behavior set disablelastaccess 1
"getting rid of atime info is an idiotic move as security goes."
lastaccesstime does not have ANY impact on security - (at least on NT, where only the timestamp is stored, and not user SID, and there is a SetFileTime API to set all file timestamps, including last access), you'd want to use audit (that Linux does not have by default?) for that
- complich8, on 10/11/2007, -1/+1I don't get why you'd think noatime is a security risk. From an intrusion detection perspective, you only really care when a file was created and when it's modified. CTIME and MTIME give you that. Just about nothing uses ATIME for anything...
- jacekpoplawski, on 10/11/2007, -1/+7Nothing really new.
DMA is a classic example of "optimization", but truth is it is always on.
It's off only if you don't have chipset support in your kernel, in that case you should try to upgrade/recompile your kernel, hdparm won't help you. - PacketBoy, on 10/11/2007, -1/+2Three Pronged Attack - I was thinking:
SubLiminal, Liminal, and SuperLiminal - Megatog615, on 10/11/2007, -2/+9Dugg for not being called "A Three Pronged Attack to Increase Ubuntu Performance".
- Dissipate, on 10/11/2007, -2/+1Why are there ads for Windows products on Linux.com??
- xlar54, on 10/11/2007, -2/+2Open source can only sustain itself so much. I always find it odd when people say they "work" for open source companies... Im thinking "as a volunteer?"
- Sparkster185, on 10/11/2007, -0/+1I work for a company that receives lots of grants from the government. All the software we create as a result of these grants is all free/open. So I guess, in a way, I work for an open-source company.
- Megatog615, on 10/11/2007, -0/+2They don't control the advertising. The ad company just pays them to host the ads.
- xlar54, on 10/11/2007, -2/+2Open source can only sustain itself so much. I always find it odd when people say they "work" for open source companies... Im thinking "as a volunteer?"
- xlar54, on 10/11/2007, -6/+3I thought Linux was the best thing since sliced bread? Which would make this article pointless. Buried for being worthless.
Ill digg an article that tells how to increase performance of a Windows machine though.- ftcram, on 10/11/2007, -2/+1start
run
cmd {enter}
fdisk c: {enter}
when done, insert current Umbuntu release & reboot
click "install me"
- ftcram, on 10/11/2007, -2/+1start
- truekid, on 10/11/2007, -3/+1how about some optimization for it to work with wireless out-of-the-box ;P
- maz2331, on 10/11/2007, -2/+0I tune the OS by using RAID cards and more RAM!
- Sdiggmatism, on 10/11/2007, -0/+0Kubuntu 7.04 i815 P3-933 all drives are /dev/sd*
WD80 PATA 53MB/sec
Hitachi250 PATA 43MB/sec
Seagate300-USB2 20MB/sec
What Linux does he have that he doesn't have wicked sick performance by default? Showing how to use 'init 1' and 'hdparm -t' are highly useful but the rest of the article seems more appropriate for a Linux long ago before the aggressive performance options were well tested enough to enable them automatically. - decoherence, on 10/11/2007, -0/+0the script to run the hdparm test should be
for ((i=0;i
Browsing Digg on your phone just got easier with our enhancements to the