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

Red Hat and Fedora

Leftovers: OSS and Sharing

  • Learn from the Experts at The Linux Foundation’s Europe Events
    The Linux Foundation has released session details for three major conferences coming up this fall: MesosCon Europe, Embedded Linux Conference / OpenIoT Summit Europe, and LinuxCon + ContainerCon Europe. MesosCon Europe, which will take place August 31-September 1 in Amsterdam, The Netherlands, is an annual conference organized by the Apache Mesos community, bringing together users and developers for two days of sessions about Mesos and related technologies. This year, the MesosCon program will include workshops to get started with Mesos, keynote speakers from industry leaders, and sessions led by adopters and contributors.
  • The Firebird Project's Firebird Relational Database
    Firebird distills its identity into the phrase "True universal open-source database" and boasts not only of being "free like free beer" but also, fittingly, of being "free like a bird". The latter permits anyone to build a custom version of the Firebird, as long as the modifications are made available for others to use and build upon.
  • Report: Austria can benefit from Big Data solutions
    Big Data solutions can contribute significantly to Austrian public administrations, a working group concludes in a report published in June. Benefits include improved quality of life, finding optimal business locations, and offering better guidance to citizens. The report by the Big Data working group aims to help public administration when considering Big Data solutions, providing legal, economic and technical context.
  • Report: over half of Spain’s regions now use SaaS
    In 2014, 59% of Spain’s regional governments used Software as a Service, according to the 2015 eGovernment report published on 30 June by PAe, Spain’s eGovernment portal. Next most-used cloud computing service is Infrastructure as a Service (40%), and third is Platform as a Service (20%). The usage of cloud computing is just one of the attributes of and indicators for eGovernment services that are aggregated in the report. The document shows the use of document management systems and support of electronic signatures. The text looks at interoperability, open data portals and eParticipation, lists region’s maturity levels of eGovernment services, from the availability to download forms online to the fully electronic management of applications.
  • Software Freedom in Kosovo, Waiting for Xfce Mint & More…
    It’s not FOSS, but I reckon the biggest story in tech this week, ignoring claims of Russia hacking for Trump, is the sale of Yahoo to Verizon for $4.8 billion. Considering that traffic watcher Alexa says the site is the fifth most visited address on the web, that seems like something of a bargain to me. Add to that Yahoo’s prime Silicon Valley real estate and the price seems to be in the “it fell of the truck” category. The sale puts Verizon in control of both America Online and Yahoo, so I suspect we’ll be seeing Verizon trying to compete with Google and Bing for a share of the search advertising market. [...] We’ve also heard from Software Freedom Kosova, which tells us it’s issued this year’s call for speakers, which will be open through September 15. This will be the seventh year for the Kosovo event, which aims to “promote free/libre open source software, free culture and open knowledge” — all laudable goals in my estimation. Potential speakers should know “the topic must be related to free software and hardware, open knowledge and culture.” Mike DuPont, the SFK member who made us aware of the event, told FOSS Force, “There might be travel expenses for qualified speakers.” The event will take place October 21-23.
  • Cloud, open source and DevOps: Technology at the GLA
    David Munn, head of IT at the Greater London Authority, explains what technology his organisation has adopted in order to help individuals keep innovating
  • Our attitude towards wealth played a crucial role in Brexit. We need a rethink
    Money was a key factor in the outcome of the EU referendum. We will now have to learn to collaborate and to share [...] Does money matter? Does wealth make us rich any more? These might seem like odd questions for a physicist to try to answer, but Britain’s referendum decision is a reminder that everything is connected and that if we wish to understand the fundamental nature of the universe, we’d be very foolish to ignore the role that wealth does and doesn’t play in our society.
  • France’s Insee and Drees publish microsimulation model to increase transparency
    Insee (Institut national de la statistique), the French public agency for statistics, and Drees (Direction des études du Ministère des Affaires sociales et de la santé), which is in charge of surveys at the Ministry of Social Affairs and Health, has published the source code of the microsimulation algorithmic model called Ines.
  • Plant Sciences pushing open-source berry model
    Several of those opportunities appear to lie in the development of so-called ‘open market’ breeding. Historically, Plant Sciences’ berry varieties have made it into the commercial arena under limited licensing arrangements, with individuals or groups of grower-shippers paying a premium to use them. While Nelson is eager to point out that this model continues to perform well, his company have decided to structure its business in Europe in such a way that it offers varieties to the “largest audience possible” at the most competitive price. “Given the price pressures that producers, marketers and retailers are under, we sense that such an approach is needed to remain most viable going forward and bring new varieties forward to the broadest market,” he explained.
  • Drug discovery test leads to malaria drug prospects at UW
  • Worldwide Open-Source Project Discovers Promising Disease-Fighting Compounds
  • Open-source drug discovery a success
  • The Global Open Data Index to be updated
    Open Knowledge International, a not-for-profit organisation that promotes openness and transparency, has decided to update the survey for its Global Open Data Index. This index measures Open Data publication in 122 countries.
  • This Startup Created the Ultimate Open-Source Prototyping Product
    The world has become a technologically focused place. Unless you’ve set up shop in a cabin in the woods, your life is likely filled with gadgets, wearables, devices, and doodads that control everything from your TV to your laptop. And with all this technology, it’s no wonder tech jobs have become so prevalent in the market. Fortunately, there are a number of ways to learn skills and prototyping projects that will impress even the most critical interviewer. And one startup has built the perfect product to do just that. Created by a group of students from the India Institute of Technology, evive is an open-source prototyping module that can make creating projects easier than ever. It has a power module, plug and play hardware interface, user interface, data acquisition module, shield stack space and more. It’s even IoT ready so it can connect to more devices than you can count. Plus, it works across multiple platforms like LabVIEW, MATLAB, Scratch, Eclipse, ROS, Python, Arduino IDE and many more.
  • Friday's security updates
  • Pwnie Express Open Sources Tools to Lock Down IoT/Android Security
    Pwnie Express isn't a name that everyone is familiar with, but in the security arena the company has a good reputation for its wired and wireless threat detection technologies. Now, the Boston-based firm has announced plans to open source key tools that it has used to secure the Internet of Things (IoT) and Android software. Blue Hydra is a Bluetooth utility that can detect Bluetooth devices, and also work as a sniffer to query devices it detects for threats. Meanwhile, the Android Open Pwn Project (AOPP), is an Android ROM built for security testers. It's based on the Android Open Source Project (AOSP) and community-developed ROMS -- one of which is CyanogenMod. It lets developers on the Android front sniff out threats on mobile platforms.

Openwashing

Sailfish OS 2.0.2

  • Sailfish OS 2.0.2 In Early Access With Variety Of Improvements
    Jolla announced today that their Sailfish OS 2.0.2 "Aurajoki" mobile operating system release is available as early access. Sailfish OS 2.0.2 makes it easier to take screenshots via the volume buttons, a variety of new keyboard layouts, a new layout on the media app, a new Sailfish OS logo, simplified backups, browser improvements, support for flash when recording videos, the cloud services now supports the VK service, dual SIM support on capable devices, Dropbox and OneDrive integration in the photo gallery, and a wide variety of other fixes and improvements.
  • [Early Access] Sailfish OS 2.0.2 Aurajoki
    This update contains of many bug fixes and new added features such as taking screenshot by holding down volume buttons for 0.5 seconds, added keyboard layouts for Indian languages Telugu, Malayalam, Kannada, Punjabi, Tamil and Bengali, new layout on Media app’s front page, new Sailfish OS logo and many more.