Overclock.net - Overclocking.net
     
 
Home Gallery Reviews Blogs Register Today's Posts Mark Forums Read Members List


Go Back   Overclock.net - Overclocking.net > Software, Programming and Coding > Operating Systems > Linux, Unix

Reply
 
LinkBack Thread Tools
Old 09-21-08   #1 (permalink)
4.0ghz
 
error10's Avatar
 
intel nvidia

Join Date: Sep 2008
Location: Manchester, New Hampshire
Posts: 9,737
Blog Entries: 4

Rep: 1166 error10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a star
Unique Rep: 708
Folding Team Rank: 51
Hardware Reviews: 1
Trader Rating: 45
Talking Linux Performance Tuning

You're running Linux, now it's time to make it run faster! I've been using Linux since 1993 () and I learned a few things along the way.

Most of these changes will improve your performance, a few I threw in because they'll make your system more stable. Enjoy!

Sysctl

The system control facility lets you tune dozens of little bits of the Linux kernel. For performance gains only a few of them are really relevant. You change these by editing the /etc/sysctl.conf file and then running sysctl -p (or rebooting).

vm.oom_kill_allocating_task = 1
By default when Linux runs out of memory it goes through the process list and starts killing off processes that it thinks are using too much memory. This sysctl makes Linux kill the runaway process that made the system run out of memory instead, which is usually what you want.

vm.page-cluster = 5
When Linux reads from the swap file it reads 2^page-cluster pages at once. It won't help to raise it past 5 because the swap is laid out in 32-page clusters.

Disk I/O

relatime
This option is a more intelligent way of tracking disk accesses that dramatically reduces disk writes and increases disk performance. Check your /etc/fstab file and for your filesystems that are listed as ext2/ext3 in the third column, in the fourth column take out "defaults" or "noatime" if they're present and replace them with "relatime". If neither of those two are present in the fourth column, then add ",noatime" to whatever is there. You need to reboot for this to take effect.

Defragmentation
This comes up often enough I may as well say a word. You don't have to. Seriously, you don't have to. The Linux ext2/ext3 filesystem is much more efficient and requires no defragmentation. Its performance does start degrading once it's around 95% full, though, so if you're at that point, go delete some ISO images or buy a new hard drive. Use the df -h command to check your filesystem capacity.

Memory

Your hard drive might have a 16MB or 32MB onboard cache and be linked to your CPU via a 100MHz PCI Express bus. Wouldn't it be nicer if you had, say, 2GB of disk cache linked 1:1 with your FSB? Well, with Linux, you do! Linux uses any free memory as a dynamically expanding and shrinking disk cache, and several of the tips below take advantage of this. To be fair, Windows does this too, just not as well, as anyone who's played with Vista's SuperFetch knows. So the performance tip here is: Buy more RAM.

Applications

preload
This package does for Linux what SuperFetch does for Windows Vista: it monitors your application usage and then whenever you boot up your system it will load your most frequently used applications into RAM while you're staring at the login prompt. The Linux version is different, though: It actually works. And Linux had it first. Preload isn't installed by default so you'll have to install it from your package manager. (It's a boot service; be sure to enable it.)

readahead
This package is related to preload but it's tuned specifically for the boot process. It starts early in the boot process and starts preloading a list of files into memory which will be used in the startup scripts that run later. This will help shave a few seconds off the boot process because these files can load while the system is busy doing other things like getting a network address. Readahead is installed by default on some distributions but not others, so you'll want to check and see if you have it, and if not, install it from your package manager and enable its boot services. (On Fedora the services are readahead_early and readahead_later; on Ubuntu it's just readahead.)

I had better mention how to enable boot services:
On Fedora you run su -c /sbin/chkconfig <servicename> on
On Ubuntu you run sudo update-rc.d <servicename> defaults

That's all for now!

I might think of a few things later; if I do, I'll update this post and bump it. Enjoy your performance tuned Linux box!

System: Underground
CPU
Core i7 920
Motherboard
ASUS P6T6 WS Revolution
Memory
3x2GB Corsair Dominator DDR3-1600
Graphics Card
EVGA 9800 GT SC 512MB
Hard Drive
4x MBA3147RC RAID5
Sound Card
Intel ICH10 HD Audio / ADI Codec
Power Supply
BFG ES-800
Case
Thermaltake Armor VA8003BWS
CPU cooling
TRUE Lapped + Scythe Slip Stream 1900
GPU cooling
Stock
OS
Fedora 10 x86_64
Monitor
HP w19b
3 Million+ Folding at Home points

Last edited by error10 : 09-21-08 at 08:11 PM
error10 is offline I fold for Overclock.net Overclocked Account error10's Gallery   Reply With Quote
Old 09-21-08   #2 (permalink)
Linux Lobbyist
 
hybrid-kernel's Avatar
 
amd nvidia

Join Date: Jun 2008
Posts: 249

Rep: 35 hybrid-kernel is acknowledged by some
Unique Rep: 32
Trader Rating: 0
Default

I have a few more:

Mount ext2/3 partitions with writeback
It generally speeds up the system, but not a whole lot. You need to add data=writeback to /etc/fstab to the parameters column and add rootflags=data=writeback to your /boot/grub/menu.lst

Low swap priority
Just google vm.swappiness.

Disable unneeded daemons
It really does speed your boot up. I usually disable things like anacron, system log and virtualbox daemons. Helps quite a bit.

Use both cores on boot
By default, your system probably only uses 1 core, having more will help, but usually I'm bottlenecked by slow disk reading speeds. If you use a debian based distro, in the file /etc/ini.d/rc change concurrency=none to concurrency=shell.

Compile a custom kernel
Take out those unused modules and components. Most distros come with a generic kernel that supports a multitude of hardware. But since you probably don't have all of it, it makes sense to remove unused components. You can google for a guide for compiling for your distro.

Thats all from the top of my head.
__________________
~Linux Enthusiast
Don't click here, I mean it. You've been warned.

System: Fission
CPU
Athlon 64 x2 4200+ @ 2.8Ghz (255 x 11)
Motherboard
Asus M2A-VM
Memory
4gb (Kingston 4x 1gb)
Graphics Card
XFX 8800gt 512mb (725/1900)
Hard Drive
250gb WD + 500gb ext
Power Supply
450w
CPU cooling
Stock
GPU cooling
Stock (Zalman)
OS
Sidux Ουρανός amd64
Monitor
Samsung Syncmaster 216BW
hybrid-kernel is offline hybrid-kernel's Gallery   Reply With Quote
Old 09-22-08   #3 (permalink)
4.0ghz
 
error10's Avatar
 
intel nvidia

Join Date: Sep 2008
Location: Manchester, New Hampshire
Posts: 9,737
Blog Entries: 4

Rep: 1166 error10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a star
Unique Rep: 708
Folding Team Rank: 51
Hardware Reviews: 1
Trader Rating: 45
Default

Hm, some of these options I like, some I don't.

data=writeback will definitely improve your performance a bit, but it runs the risk of data corruption in the event your system suddenly goes south (e.g. because you overclocked too far).

vm.swappiness I considered adding in, but it's a tricky parameter and there is no one good setting for it. It's something you have to play with. And if you've got 4GB or more of RAM you aren't likely to run into many situations where changing it will help you.

Disabling unnecessary services is a good one. Though what one person considers unnecessary another considers vital. I'd never disable the system log or the VirtualBox service; I use both of those!

concurrency=shell is something specific to Ubuntu (or maybe all Debian based systems) though most distributions have some means of parallel startup.

And I wasn't even about to attempt to explain how to build a custom kernel. Though it's true you'll save some hard drive space, the performance benefits are negligible. And what happens when you upgrade? All those modules mean you can plug almost anything into your box and the system will bring it up without even bothering you about it.

So those are all good ideas but they have their downsides which people should be aware of before they go and do them.

System: Underground
CPU
Core i7 920
Motherboard
ASUS P6T6 WS Revolution
Memory
3x2GB Corsair Dominator DDR3-1600
Graphics Card
EVGA 9800 GT SC 512MB
Hard Drive
4x MBA3147RC RAID5
Sound Card
Intel ICH10 HD Audio / ADI Codec
Power Supply
BFG ES-800
Case
Thermaltake Armor VA8003BWS
CPU cooling
TRUE Lapped + Scythe Slip Stream 1900
GPU cooling
Stock
OS
Fedora 10 x86_64
Monitor
HP w19b
3 Million+ Folding at Home points
error10 is offline I fold for Overclock.net Overclocked Account error10's Gallery   Reply With Quote
Old 09-22-08   #4 (permalink)
Linux Lobbyist
 
thiussat's Avatar
 
amd nvidia

Join Date: Apr 2008
Location: USA
Posts: 1,212

Rep: 186 thiussat is acknowledged by manythiussat is acknowledged by many
Unique Rep: 130
Trader Rating: 0
Default

Quote:
Originally Posted by hybrid-kernel View Post
I have a few more:

Disable unneeded daemons
It really does speed your boot up. I usually disable things like anacron, system log and virtualbox daemons. Helps quite a bit.
I can see disabling anacron if you never use it, but I think disabling the system logger is a big mistake.
__________________
System: Windows Immune
CPU
X2 4000+ Brisbane@2.8 GHZ
Motherboard
Gigabyte GA-M57SLI-S4
Memory
1x2 GB Corsair XMS2 PC6400
Graphics Card
Geforce 8400GS
Hard Drive
WD5000AAKS 500GB SATA
Sound Card
Soundblaster Live! 5.1
Power Supply
Xclio X14-S4P3 500W
Case
NZXT Lexa Blackline
CPU cooling
Rosewill RCX-Z940-LX (lapped)
OS
Gentoo X86_64
Monitor
Asus VH242 24" 1920x1080p
thiussat is offline   Reply With Quote
Old 09-22-08   #5 (permalink)
Linux Lobbyist
 
thiussat's Avatar
 
amd nvidia

Join Date: Apr 2008
Location: USA
Posts: 1,212

Rep: 186 thiussat is acknowledged by manythiussat is acknowledged by many
Unique Rep: 130
Trader Rating: 0
Default

Quote:
Originally Posted by error10 View Post
Hm, some of these options I like, some I don't.


And I wasn't even about to attempt to explain how to build a custom kernel. Though it's true you'll save some hard drive space, the performance benefits are negligible. And what happens when you upgrade? All those modules mean you can plug almost anything into your box and the system will bring it up without even bothering you about it.
I prefer to customize my kernel. Then again I run Gentoo and it is pretty much standard to compile your own (I prefer manual compiling and not "genkernel.")

While taking out unused modules may not really impact anything other than a couple of megs of HD space, there are several other performance advantages you can gain by customizing (like setting your processor architecture).

When I use binary distros, I don't usually fool with the kernel because none of the non-kernel apps are compiled locally anyway. With Gentoo I compile everything on my system myself (except for the stage3 tarball libs).
__________________
System: Windows Immune
CPU
X2 4000+ Brisbane@2.8 GHZ
Motherboard
Gigabyte GA-M57SLI-S4
Memory
1x2 GB Corsair XMS2 PC6400
Graphics Card
Geforce 8400GS
Hard Drive
WD5000AAKS 500GB SATA
Sound Card
Soundblaster Live! 5.1
Power Supply
Xclio X14-S4P3 500W
Case
NZXT Lexa Blackline
CPU cooling
Rosewill RCX-Z940-LX (lapped)
OS
Gentoo X86_64
Monitor
Asus VH242 24" 1920x1080p
thiussat is offline   Reply With Quote
Old 09-22-08   #6 (permalink)
4.0ghz
 
error10's Avatar
 
intel nvidia

Join Date: Sep 2008
Location: Manchester, New Hampshire
Posts: 9,737
Blog Entries: 4

Rep: 1166 error10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a star
Unique Rep: 708
Folding Team Rank: 51
Hardware Reviews: 1
Trader Rating: 45
Default

Quote:
Originally Posted by thiussat View Post
When I use binary distros, I don't usually fool with the kernel because none of the non-kernel apps are compiled locally anyway. With Gentoo I compile everything on my system myself (except for the stage3 tarball libs).
emerge --emptytree world

System: Underground
CPU
Core i7 920
Motherboard
ASUS P6T6 WS Revolution
Memory
3x2GB Corsair Dominator DDR3-1600
Graphics Card
EVGA 9800 GT SC 512MB
Hard Drive
4x MBA3147RC RAID5
Sound Card
Intel ICH10 HD Audio / ADI Codec
Power Supply
BFG ES-800
Case
Thermaltake Armor VA8003BWS
CPU cooling
TRUE Lapped + Scythe Slip Stream 1900
GPU cooling
Stock
OS
Fedora 10 x86_64
Monitor
HP w19b
3 Million+ Folding at Home points

Last edited by error10 : 09-22-08 at 07:15 AM
error10 is offline I fold for Overclock.net Overclocked Account error10's Gallery   Reply With Quote
Old 09-22-08   #7 (permalink)
PC Gamer
 
legoman786's Avatar
 
intel ati

Join Date: Mar 2006
Location: Tucson, AZ
Posts: 6,577
Blog Entries: 7

Rep: 238 legoman786 is acknowledged by manylegoman786 is acknowledged by manylegoman786 is acknowledged by many
Unique Rep: 192
Folding Team Rank: 928
Trader Rating: 10
Default

Interesting...

Repped.
__________________
¿uʍop ǝpısdn ʇı pɐǝɹ noʎ uɐɔ
September 1, 2009 - Never forget.

System: 299,792,458 m/s² x >9000
CPU
E5200
Motherboard
DFI LP DK P45-T2RS PLUS
Memory
2x2GB G.Skill 1066 (5-5-5-15-2T 1.8V)
Graphics Card
Sapphire 4850 512MB
Hard Drive
820GB Total
Sound Card
Audigy eX Plat + ProMedia 2.1
Power Supply
Corsair VX550W
Case
Tagan CS-A+ Seenium RT
CPU cooling
Stock
GPU cooling
VF900
OS
Vista Ultimate x64
Monitor
Viewsonic Graphics G220fb 21" CRT
legoman786 is online now I fold for Overclock.net legoman786's Gallery   Reply With Quote
Old 09-22-08   #8 (permalink)
om nom nom
 
-iceblade^'s Avatar
 
amd nvidia

Join Date: Apr 2008
Location: On earth, thankfully.
Posts: 7,354

Rep: 533 -iceblade^ is becoming famous-iceblade^ is becoming famous-iceblade^ is becoming famous-iceblade^ is becoming famous-iceblade^ is becoming famous-iceblade^ is becoming famous
Unique Rep: 397
Trader Rating: 3
Default

i agree this IS interesting...

compiling your own distro? not something i would dare do, being still very young at all this
__________________
must... help... moar...

Quote:
Originally Posted by Afrodisiac
honestly, i couldnt care less if the Wickede Queen of Alara dropped a MostPotente Magicke Staff down the Mines of Haraltraqhor's Lair - im more into headshots and guns:
Quote:
Originally Posted by TnB= Gir, re RAGE
But will the PC have custom features like mouse control, text chat in game, and graphics settings?
parts in [] brackets indicate planned upgrades.

System: Diomedes
CPU
[AMD Phenom II X4 940 @ 3.25ghz]
Motherboard
[Gigabyte GA-MA785GMT-UD2H]
Memory
[2x2gb G.Skill HK DDR3 1333]
Graphics Card
XFX 8800GT
Hard Drive
300gb Seagate IDE, 640 WD AAKS & AACS
Sound Card
onboard
Power Supply
Hiper 580W
Case
Packard Bell Crescendo
CPU cooling
stock
GPU cooling
stock
OS
[Windows 7 Professional x64]
Monitor
Samsung Series 6 HDTV @ 1360 x 768
-iceblade^ is offline Overclocked Account   Reply With Quote
Old 09-22-08   #9 (permalink)
Linux Lobbyist
 
jul3z's Avatar
 
intel nvidia

Join Date: Jan 2008
Location: Chandler, AZ
Posts: 771

Rep: 61 jul3z is acknowledged by some
Unique Rep: 55
Folding Team Rank: 1769
Trader Rating: 1
Default

I'd be interested to learn about that also, but just barely getting into Linux.
The one thing i have going for me is that regarding computers and systems, i learn fast and am not affraid of breaking things that are fixable. (thanks to my dad letting me rip the guts outta the family pc when i was 9. or wait, maybe he didn't let me....)
__________________
System: Atmospheric Pressure
CPU
Core2 Quad Q6600
Motherboard
Asus Striker Extreme
Memory
2x2Gig PATRIOT Viper Fin
Graphics Card
EVGA 88000GTS KO 640MB
Hard Drive
250Gb Hitachi // 160Gb Samsung
Power Supply
Sigma Shark SP-635W
Case
Coolermaster Stacker 830 SE
CPU cooling
Asus Silent Knight II (Peice of junk)
OS
Vista Business 64bit/Fedora9/Slackware
Monitor
Syncmaster 2232 BW 22"
jul3z is offline I fold for Overclock.net   Reply With Quote
Old 09-22-08   #10 (permalink)
4.0ghz
 
error10's Avatar
 
intel nvidia

Join Date: Sep 2008
Location: Manchester, New Hampshire
Posts: 9,737
Blog Entries: 4

Rep: 1166 error10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a starerror10 is a star
Unique Rep: 708
Folding Team Rank: 51
Hardware Reviews: 1
Trader Rating: 45
Default

Quote:
Originally Posted by jul3z View Post
I'd be interested to learn about that also, but just barely getting into Linux.
The one thing i have going for me is that regarding computers and systems, i learn fast and am not affraid of breaking things that are fixable. (thanks to my dad letting me rip the guts outta the family pc when i was 9. or wait, maybe he didn't let me....)
You can try building a Linux From Scratch. You get to learn how all the internals are put together and feel the distro maintainers' pain.

I recommend doing it in a virtual machine.

System: Underground
CPU
Core i7 920
Motherboard
ASUS P6T6 WS Revolution
Memory
3x2GB Corsair Dominator DDR3-1600
Graphics Card
EVGA 9800 GT SC 512MB
Hard Drive
4x MBA3147RC RAID5
Sound Card
Intel ICH10 HD Audio / ADI Codec
Power Supply
BFG ES-800
Case
Thermaltake Armor VA8003BWS
CPU cooling
TRUE Lapped + Scythe Slip Stream 1900
GPU cooling
Stock
OS
Fedora 10 x86_64
Monitor
HP w19b
3 Million+ Folding at Home points
error10 is offline I fold for Overclock.net Overclocked Account error10's Gallery   Reply With Quote
Reply

Tags
hard drive, linux, memory, performance


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools



All times are GMT -4. The time now is 10:34 PM.


Overclock.net is a Carbon Neutral Site Creative Commons License

Terms of Service / Forum Rules | Privacy Policy | DMCA Info | Advertising | Become an Official Vendor
Copyright © 2009 Shogun Interactive Development. Most rights reserved.
Page generated in 0.18614 seconds with 8 queries