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 |
- Twelve Vulnerabilities Have Been Fixed In Ubuntu 12.04, Time To Update : Canonical has released security updates for Ubuntu 12.04 LTS and advices to update your system as so...1 comment |
- 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 |
- TeamViewer 9 Final Has Been Released! : TeamViewer is a commercial all-in-one software that can be used for remote control, desktop sharing,...0 comments |
- Setup DNS Server On openSUSE 13.1 : What is DNS Server? As you might know, DNS, Domain Name System, is a system that resolves Domain ...0 comments |
- Install lamp with 1 command in Ubuntu 12.10, 13.04 Raring Ringtail & LinuxMint13 : Updated: 10/09/2012 :LAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform ...0 comments |
- 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
- OpenLDAP Installation and Configuration in Ubuntu 12.10/13.04/13.10 And Debian 6/7
- Configure Your Browser To Use Tor On Ubuntu/Debian/Linux Mint
- Setup A Full Featured ITIL Management System Using Integria IMS On CentOS 6
- Install LibreOffice 4.1.3 in Elementary OS ‘Luna’
- How To Install Simple Scan in Crunchbang ‘Waldorf’
- Selene Media Encoder: Convert Audio, Video Files To Most Popular Formats
- Linux Kernel 3.12.2 Is Available For Download! Install / Upgrade Instructions
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .