Performance on Linux. Just how far *can* we go?
As the title suggests, Linux and performance in the same sentence makes for an interesting topic of discussion. Everyone knows there is a multitude of options available to us. In this article, I’m going to attempt to cover a few of them.
The first thing we need to work out is are we using a source based distribution (eg. Gentoo/Funtoo) or a Binary based distribution (eg. Fedora/Debian/Ubuntu). Each of these examples carry some variables that the other ones don’t. Source based distributions allow you to modify the compiler options to optimize the code at build time, whereas the binary based distributions don’t allow us to do this (unless I’m proven wrong).
Starting with the source based distributions, we can find the best CFLAGS to run by a quick trip to the following link https://wiki.gentoo.org/wiki/CFLAGS. This will give us the safe CFLAGS to use for our processor, which is what the initial focus of this article is. Later articles will focus on more in-depth ways we can get a bit more speed out of our beloved Linux installation.
Once we have the safe CFLAGS we want to use, the following excerpt from the afore mentioned link explains what we need to know:
The CFLAGS and CXXFLAGS are environment variables whose content is passed on to each invocation of cc (the C compiler, usually gcc) or C++ (the C++ compiler, usually g++), respectively, during compile and build phases of software. Within Gentoo, these variables are set in /etc/portage/make.conf so that each compile job invoked by the package manager uses them.
This does mean we will also need to perform an update and world rebuild with the new flags. Let’s see if I can remember the options:
emerge --sync && emerge -eavuD world
This instructs Gentoo to perform a sync, then to recompile the world with new build CFLAGS.
I’d leave this alone for a while, because it could take a bit. So we can move along to the next thing we want to look at while working along this path.
HDParm, our beloved hard disk tuning package. The first thing we need to find with this, is what the settings our drive is currently using. We can do this by performing the following commands:
hdparm -i /dev/<sda/hda> & also hdparm -I /dev/<sda/hda>
These commands will talk to the drive and relay their current settings, showing us how they are configured. From here, it’s a case of messing with readahead cache (-a), write cache (-W), which are two of the main ones you need to look at, if aiming to just do a bit of “tweaking”.
Of course as you can gather, this is just the tip of the iceberg. There is many many more options we can discover. Part of the thing you will need to consider while doing all of this is, is the effort you are putting in worth the result you will get? All these options/tweaks/changes will only get us so far. If your hardware is ancient, just remember the law of diminishing returns.
Full-system update to latest code is always another good starting point. You will be surprised just how much performance gains you can obtain from just performing a full system update.
This guide will more than likely end up being a multi-part, as there is far too much to cover in just one article for someone to read (maybe the hardcore fans!).
Don’t forget my motto, if it ain’t broke, you ain’t tweaked it right! Peace out!
Like us on Facebook
This week Top Posts
- Top Things To Do After Installing Ubuntu 13.10 'Saucy Salamander' : Ubuntu 13.10 Saucy Salamander will be released on coming October 17th with many new salient featur...0 comments |
- Setup IT And Asset Management System With GLPI On Debian/Ubuntu : GLPI is the Information Resource-Manager with an additional Administration Interface. You can use it...0 comments |
- How To Configure Linux Clients To Authenticate Using OpenLDAP : This is the continuation of our previous tutorial. In our previous tutorial we learned how to instal...0 comments |
- Manage Databases And Hosted Servers Remotely With DbNinja : Database administration via command line is bit difficult for newbie system and database administrat...0 comments |
- Install FrostWire 5.6.9 In Elementary OS 'Luna'/ Ubuntu / Linux Mint : FrostWire is a peer-to-peer file sharing program for the gnutella and BitTorrent protocols. FrostWir...0 comments |
- How To Upgrade From Ubuntu 13.04 Raring To Ubuntu 13.10 Saucy Salamander : Ubuntu 13.10 Saucy will be released on October 17th. Hope it will come with lot of improvements and ...0 comments |
- Manage Databases And Hosted Servers Remotely With DbNinja
- Install FrostWire 5.6.9 In Elementary OS ‘Luna’/ Ubuntu / Linux Mint
- Setup IT And Asset Management System With GLPI On Debian/Ubuntu
- How To Configure Linux Clients To Authenticate Using OpenLDAP
- How To Install Netflix In Ubuntu
- cowsay And fortune Combined Together
- How To Show Username On Panel In Ubuntu 13.04/13.10
- Setup DNS Server On openSUSE 13.1
- TeamViewer 9 Final Has Been Released!
- Twelve Vulnerabilities Have Been Fixed In Ubuntu 12.04, Time To Update
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .