Language Selection

English French German Italian Portuguese Spanish

Performance Tweaks & Tips

Filed under
Howtos

Has your system seemed to have slowed down lately or perhaps it never performed the way you thought it should. Do you ever exclaim, seems my friend's computer is much faster than mine... or the dreaded, my XP is faster than linux? Bite your tongue and check out a few things on your gentoo install.

I don my asbestos house robe and share a few things I've learned from my time with gentoo. Actually these principals can be applied to any linux installation, but I had gentoo in mind when writing them.


  • Filesystem type can make a difference. You should have researched this before install the only conversion that works is ext2 to ext3. If possible for you, you may want to test different filesystems to see which works for you best.

    • I prefer reiserfs. I find it stable and have never lost an install using it. Every lost partition was on ext2 and ext3. I find reiserfs the fastest for me as it's probably best for a bunch of small files as opposed to a few large ones. YMMV.


  • Optimize your build flags.

    • You should have chosen your CFLAGS very carefully at install time for your system, but it doesn't hurt to consult the documentation and recheck them from time to time, maybe every major version gcc upgrade. Some get deprecated while new ones introduced.
    • You'll hate to hear this one, but rebuild at least major packages if you change them dramatically (glibc, gcc, binutils, qt, gtk, X, mod-utils, kernel, kde, etc). In fact some you may have to build twice, like gcc and glibc.


  • USE flags.
    • Some use flags can help speed things up. One of which is nptl if you're running a 2.6 kernel.

    • Read the documentation and select your USE flags carefully. Building support into apps that you'll never need can and will slow some things down.

      • I hesitate to post my CFLAGS and USE flags as they are so system and goal dependent. Please check the documentation here
        and here.


  • Less info stored the better.

    • Keep all your big movie files and such on another partition. Preferably one that's not mounted all the time.

    • Remove unnecessary files such as in /tmp,
      /usr/portage/distfiles and /var/tmp/portage. These can build up fast. Check them often, or as I do, I put the following in my /etc/conf.d/local.start file: rm /usr/portage/distfiles/* -rf
      rm /var/tmp/portage/* -rf

    • Remove all old kernels. I usually keep the last two sources, kernels and modules around. If you run gentoo, you know it don't take long before you have a lot of kernel sources.
    • Check that home directory. In my case, it don't take long at all before I have all kinds of jpegs, gifs, and mpegs laying around. Clear out those application sources, crash dumps, and dot files/directories (you no longer need).
    • Check your /var/log/ directory. Perhaps change your logrotate schedule to keep only a couple rotations instead of the default 5.


  • Your kernel is the brain of your os, don't let it get all scrambled. (little joke there)

    • Upgrade to a 2.6 kernel. I found a noticeable speed increase when I made the switch.
    • Turn on pre-empt.
    • Build support for all filesystems you use daily into the kernel as opposed to modules.
    • Same goes for ethernet support.
    • Don't enable support for all this cool stuff you plan on getting someday.
    • Don't load every module at boot time unless you're gonna use it regularly.
    • Disable debugging.


  • ccache
    • ccache can speed up those compile times somewhat in if you need to restart a compile, it'll take up where it left off. This is especially handy in the cases of mozilla, openoffice.org or kde-meta for example. All of which are huuuge and take forever to compile - and quite frequently bomb out before it completes.
    • May not be installed by default. emerge ccache and put an entry in your /etc/make.conf in the FEATURES.


  • hdparm - Tweak the harddrive.
    • You'll need to install hdparm, emerge hdparm, as it's not installed by default.
    • I check that dma is enabled (also make sure you build support for your chips in the kernel). set with the -d flag - 1 on, 0 off. (test first, may already be enabled if running 2.6).
    • 32-bit IO - use -c1 to set on.
    • Multi-sector count - you'll have to experiment with this one. I usually find 16 works best for me.
      • You can check your drive's set up with something like this
        example:   hdparm -Ii /dev/hda

      • Check your harddrives' speed, for example:   hdparm
        -Tt /dev/hd[ab]
        • so the command that I put in my /etc/conf.d/local.start is:   hdparm -d1 -c1 -m16 /dev/hd[ab]


  • Video/Graphics

    • Use the correct kernel and X support for your graphics card - don't rely on basic vesa or fb-vesa if possible.

    • If you have an nvidia or newer ati, I suggest using the proprietary drivers they provide. (I know, know...)
    • Do you really need "composite" or "render" acceleration enabled?
    • Use the lowest resolution, bit depth, and refresh you can stand. I like mine at 1280x1024x16@85, (although I had to recently begin using 24 bit depth so DOOM 3 would play).


  • Misc

    • Temp - excessive temperatures can slow things down. In fact they can cause crashes and even system damage. Perhaps your fans and heatsink(s) need blowing out.

    • Do you have services starting up that you don't need? xinetd, apache, sendmail, or cups just for example?
    • Prelinking - ok, I really don't mess with this much anymore as I didn't see much difference and it was a pain to remember to re-run every upgrade. But some people like it, so I mention it as something you may want to research.
    • Cli - this is one of the most underrated tips one can get. Gui's are nice and I like my eyecandy as much as the next person, but so many times a cli application or built-in command can do a task much more quickly and efficiently than a gui application. See what you can substitute.


  • Can you think of others?


More in Tux Machines

today's leftovers

  • iTWire - Microsoft to reduce global workforce
  • Microsoft Faces Two Lawsuits For Aggressive Windows 10 Upgrade Campaign
    The series of lawsuits against Microsoft doesn’t seem to terminate sooner.
  • Controlling access to the memory cache
    Access to main memory from the processor is mediated (and accelerated) by the L2 and L3 memory caches; developers working on performance-critical code quickly learn that cache utilization can have a huge effect on how quickly an application (or a kernel) runs. But, as Fenghua Yu noted in his LinuxCon Japan 2016 talk, the caches are a shared resource, so even a cache-optimal application can be slowed by an unrelated task, possibly running on a different CPU. Intel has been working on a mechanism that allows a system administrator to set cache-sharing policies; the talk described the need for this mechanism and how access to it is implemented in the current patch set.
  • Why Blockchain Matters
    If your familiarity with Bitcoin and Blockchain is limited to having heard about the trial of Silk Road’s Ross Ulbricht, you can be forgiven -- but your knowledge is out of date. Today, Bitcoin and especially Blockchain are moving into the mainstream, with governments and financial institutions launching experiments and prototypes to understand how they can take advantage of the unique characteristics of the technology.
  • Our Third Podcast, with Cybik, is Out Now
    Cybik comes back on how he came to know and use Linux in the first place, his gaming habits, how he got involved into the Skullgirls port, and shares with us his outlook on the Linux gaming landscape. The podcast is just an hour long and you can either download it below, and use our RSS feed (that has the additional benefit of making it easy for you to get new episodes from now on):
  • GSoC: final race and multi-disc implementation
    It’s been a while since I wrote a post here. A lot has happened since then. Now Gnome-games fully supports PlayStation games, with snapshoting capabilities. The next thing I’m working on is multi-disc support, specially for PlayStation titles. So far, there’s a working propotity although a lot needs to be re-engineered and polished. This last part of the project has involved working both in UI, persistance and logic layers.
  • This Week in GTK+ – 11
    In this last week, the master branch of GTK+ has seen 22 commits, with 6199 lines added and 1763 lines removed.
  • [Solus] Replacement of Release Schedule
    In the not so distant past, Solus followed a static point release model. Our most current release at this time is 1.2, with a 1.2.1 planned to drop in the near future. However, we also recently announced our move to a rolling release model. As such, these two schools of thought are in contradiction of one another.
  • First release of official ArchStrike ISO files! [Ed: last week]
  • July ’16 security fixes for Java 8
    On the heels of Oracle’s July 2016 security updates for Java 8, the icedtea folks have released version 3.1.0 of their build framework so that I could create packages for OpenJDK 8u101_b13 or “Java 8 Update 101 Build 13” (and the JRE too of course).
  • Pipelight update
    I decided to do an update of my “pipelight” package. I had not looked at it for a long time, basically because I do not use it anymore, but after I upgraded my “wine” package someone asked if I could please write up what could be done for wine-pipelight. As you know, pipelight is a Linux plugin wrapper for Mozilla-compatible browsers which lets you install and use Windows plugins on Linux. This configuration enables you to access online services which would otherwise be unavailable to you on a Linux platform. The pipelight plugin wrapper uses wine to load the Windows software.
  • Red Hat, Inc. (NYSE:RHT) Current Analyst Ratings
  • Friday Session Wrap for Red Hat, Inc. (NYSE:RHT)
  • Fedora @ EuroPython 2016 - event report
  • Android 7.0 Nougat could be release as soon as next month
  • Android gains anti-spam caller ID feature
  • Amazon Cloud Revenue Hits $2.9B
  • ServerMania – Discover High Availability Cloud Computing, powered by OpenStack
    Cloud computing is fast growing in the world of computer and Internet technology, many companies, organizations and even individuals are opting for shared pool of computing resources and services. For starters, Cloud computing is a type of Internet-based computing where users consume hosted services on shared server resources. There are fundamentally three types of cloud computing available today: private, public and hybrid cloud computing.

Leftovers: OSS and Sharing

  • Student survey data shows Open Source training uptake amongst women and young people remains extreme
    Future Cert, the UK and Ireland representative for the LPI (Linux Professional Institute), is calling for more awareness of Open Source software training amongst the under 21s and especially women, which the industry is so desperately in need of. New figures from a recent Future Cert student survey reveals that the number of women and young people taking LPI Certification in Open Source computing remains extremely low. Of those questioned, 98% were male, and just 2% were female, taking an LPI exam. This figure is significantly less than an already low figure of around 15% to 17% of women in IT careers in general. It raises the question, what does the industry need to do to make an Open Source career attractive to women?
  • Quality in open source: testing CRIU
    Checkpoint/Restore In Userspace, or CRIU, is a software tool for Linux that allows freezing a running application (or part of it) and checkpointing it to disk as a collection of files. The files can then be used to restore and run the application from the point where it was frozen. The distinctive feature of the CRIU project is that it is mainly implemented in user space. Back in 2012, when Andrew Morton accepted the first checkpoint/restore (C/R) patches to the Linux kernel, the idea to implement saving and restoring of running processes in user space seemed kind of crazy. Yet, four years later, not only is CRIU working, it has also attracted more and more attention. Before CRIU, there had been other attempts to implement checkpoint/restore in Linux (DMTCP, BLCR, OpenVZ, CKPT, and others), but none were merged into the mainline. Meanwhile CRIU survived, which attests to its viability. Some time ago, I implemented support for the Test Anything Protocol format into the CRIU test runner; creating that patch allowed me to better understand the nature of the CRIU testing process. Now I want to share this knowledge with LWN readers. [...] The CRIU tests are quite easy to use and available for everyone. Moreover, the CRIU team has a continuous-integration system that consists of Patchwork and Jenkins, which run the required test configurations per-patch and per-commit. Patchwork also allows the team to track the status of patch sets to make the maintainer's work easier. The developers from the team always keep an eye on regressions. If a commit breaks a tree, the patches in question will not be accepted.
  • Open-source Wire messenger gets encrypted screen-sharing
    Chat app Wire has been rapidly adding feature as of late as it looks to gain some traction against the myriad of competitors out there. The latest trick in its arsenal is screen sharing. Now you can click on the new screen-sharing button to, well, share your screen during a call (if you’re on a desktop, that is). It works during group chats too and, as with all Wire communications, is encrypted end-to-end. Wire believes it’s the first messaging app to include end-to-end encryption.
  • SPI board election results are available
    Software in the Public Interest (SPI) has completed its 2016 board elections. There were two open seats on the board in addition to four board members whose terms were expiring. The six newly elected members of the board are Luca Filipozzi, Joerg Jaspert, Jimmy Kaplowitz, Andrew Tridgell, Valerie Young, and Martin Zobel-Helas. The full results, including voter statistics, are also available.
  • SFK 2016 - Call for Speakers
    Software Freedom Kosova is an annual international conference in Kosovo organized to promote free/libre open source software, free culture and open knowledge, now in its 7th edition. It is organized by FLOSSK, a non governmental, not for profit organization, dedicated to promote software freedom and related philosophies.
  • Microsoft's Next Open Source Target Could Be PowerShell: Report
  • Open-source drug discovery project advances drug development
  • The First-Ever Test of Open-Source Drug-Discovery
  • Open-Source Drug Discovery a Success
  • CNS - Open-Source Project Spurs New Drug Discoveries
    Medicines for Malaria Venture, a nonprofit group based in Geneva, Switzerland, distributed 400 diverse compounds with antimalarial activity — called the Malaria Box — to 200 labs in 30 nations in late 2011. The findings from subsequent studies and analyses were published Thursday in the journal PLOS Pathogens. Distributing the Malaria Box to various labs enabled scientists to analyze the compounds and develop findings that have led to more than 30 new drug-development projects for a variety of diseases. As a stipulation to receiving the samples, the various research groups had to deposit the information from their studies in the public domain.
  • Wire and Launchkit go open source, a water flow monitoring system, and more news
  • Apache, astsu, Biscuit, Python, Puppet 4, systemd & more!
  • The Onion Omega2: The Latest Router Dev Board
  • Build a $700 open source bionic prosthesis with new tutorial by Nicolas Huchet of Bionico
    The 3D printing community has already successfully taken over the market for cosmetic prostheses, as fantastic initiatives like E-NABLE have proven. But the world of bionics is a different place and just a handful of makers have gone there with any form of success, such as the very inspiring Open Bionics. But even 3D printed bionic prostheses are definitely within our reach, as French open source fanatic Nicolas Huchet of Bionico has proven. Though by no means a making expert himself, he 3D printed his own open source bionic hand during a three month residency at FabLab Berlin and has now shared all the files – including an extensive tutorial – online. This means you can now 3D print your very own bionic prosthesis at home for just $700.
  • BCN3D Technologies develops open source 3D printed 'Moveo' robotic arm for schools
    Designed from scratch and developed by BCN3D engineers in collaboration with the Generalitat de Catalunya’s Departament d’Ensenyament (Department of Education), the BCN3D Moveo is an Arduino Mega 2560-powered, 3D printed robotic arm which could enable schools and colleges in Spain and elsewhere to teach students the basics of robotics, mechanical design, and industrial programming. When the Departament d’Ensenyament approached BCN3D one year ago regarding the possibility of an educative robotics project, the tech organization jumped at the chance to get on board.

Security Leftovers

10 hot Android smartphones that got price cuts recently

With numerous smartphone getting launched each month, brands always adjust prices to give slightly competitive edge to older smartphone models and also to clear inventories. Here are 10 smartphones that got price cuts recently. Read more