# How do i get the best performance?

## Elim

I am going to take it upon myself to build a system which is spacifically taliored to gaming. This means i want the fastest system possible with the maxiumum ammount of resources to be free. Does anyone know which kernel is the fast as far as online gaming is concirned so far i have found the 2.6.12 to be very fast indeed and i will recompile it without unnessisary drivers to make it even faster. 

Is there a way of getting xorg to use less resources when i get into fluxbox i usually have about 128mb of my ram taken and inspection shows that about 100mb is by the xserver. I know xorg has some 'eye candy' features which bloat it's size and is there a way to reduce the bloat?

Im not interested in compiler optimisations but has anyone got any ideas how i can maximise my performance?

P.s turning of kernel preempting has made my system run faster and it no longer crashes i don't know whether this is due to the 2.6.12-mm release over the 2.6.11 r9 gentoo kernel but its alot more stable and faster.

----------

## i92guboj

 *Elim wrote:*   

> Does anyone know which kernel is the fast as far as online gaming is concirned so far i have found the 2.6.12 to be very fast indeed and i will recompile it without unnessisary drivers to make it even faster. 

 

Use vanilla sources if you don't need any exotic hardware feature. Then activate the cfq scheduler, if is far better when it comes to interactivity. All the rest of heavy patched kernels are (IMO) unstable, and they are all based on the vanilla sources, the only difference is that they add loads of patches to put into the kernel things like reiser4 and swsusp2, which will only cause troubles.

If you are using the box for games then I would recommend you to use a elaborated filesystem scheme. That will improve the cpu performance in an high percentage (though, most people seems not to want to make aware of this). The less cpu that the filesystem write/read need, the most cpu you will have available for really important operations, like drawing zillions of polygons and animate heavy 3d models.

For the root (/) I would encourage you to use xfs or ext3. You can use ext2 for /var, /boot, /usr/src and /usr/portage (the lowest cpu usage and the faster filesystem, since it does not use journalling). And maybe ext3 (the more trustable fs IMO) for /home.

 *Elim wrote:*   

> Is there a way of getting xorg to use less resources when i get into fluxbox i usually have about 128mb of my ram taken and inspection shows that about 100mb is by the xserver. I know xorg has some 'eye candy' features which bloat it's size and is there a way to reduce the bloat?
> 
> 

 

The only thing that you can make to optimize a bit this big X thing is to make sure that you haven't enabled the Xcomposite extension. For the rest, just install only the fonts that you are going to need, and you should be fine.

Don't trust the monitoring programs when they tell you about the mem comsumption, since most of the memory that they report as used is usually buffered, which means the it has been allocated to be used as buffer if necesary, but it is basically free memory, that can be used by any program. So if you dont start any heavy stuff nor any desklets or any other thing like that you should be fine, in which is memory related.

 *Elim wrote:*   

> 
> 
> Im not interested in compiler optimisations but has anyone got any ideas how i can maximise my performance?
> 
> 

 

At last, someone who thinks for himself. Really that compilation "improvements" are kinda useless. IMO (again) only a developer can choose with some chance of being correct which cflags are correct for his/her program. Most "optimizations" are just spending time in a useless way. Just set -march <your_architecture> and -O1/2/3/s and you should be fine.

As I said, you can use cfq sccheduler to boost the interactivity of your system. As here if you dont find how to do that in the forums. The preemptivity also helps a lot. For the rest make sure that dma is on, that your graphic card is working ok and with all of its features on, and, if you use some vixie-cron script to make update your slocate database, make sure that you renice the correct line on the script to -n 19.

If I remember something else I will post it here. If you want further explanation on something just ask for it, hope it helped  :Smile: 

<edit>

Make sure that, when you compile X, you use all the possible extensions on your system. I mean:

```

# emerge -pv xorg-x11

Calculating dependencies ...done!

[ebuild   R   ] x11-base/xorg-x11-6.8.2-r1  -3dfx +3dnow +bitmap-fonts -cjk -debug -dlloader -dmx -doc -font-server -hardened -insecure-drivers -ipv6 -minimal +mmx +nls +opengl +pam -sdk +sse -static +truetype-fonts +type1-fonts (-uclibc) -xprint +xv 0 kB

```

Make sure that, if aplicable, you have 3dnow, sse, mmx, and all what you consider should be in your cpu, turned on in your USE flags. That way X will use all that extensions.

----------

## MWalton

Make sure to keep your comp. relitivily clean, otherwise defragmented.  It makes it so it opperates faster.

MWalton

----------

## johntramp

haha defragment!  I havent heard of that for years.   It isn't his windows os he wants to improve :p

----------

## i92guboj

 *johntramp wrote:*   

> haha defragment!  I havent heard of that for years.   It isn't his windows os he wants to improve :p

 

Haha, fragmentation is not a windows problem, but an hd problem. Linux filesystems do fragment also. Slower, but they do.  :Razz: 

----------

## man

hey all, ignore all those posts re: cflags. you'll get a stable system with none. cflags suck arse and contribute greatly to system breakages. gentoo is fine without them.

man

----------

## i92guboj

Hey! Don't ignore mine. I also recommend not using essoteric cflags. Just -O2 (or -Os), -pipe and -march=<whatever>. Anyway, inteligent makefiles ignore stupid cflags. But some others do not do it...

----------

## MetX

I recommend for the CFLAGS part to DEFINITELY put in -march=<cpuType> and -O2    as well as -fomit-frame-pointers  (since I'm assuming you aren't using X86_64 which automatically drops those).

Personally, I use reiserfs since it works excellent w/ the TONS of small files on a gentoo system.  XFS would be a good one for /opt (since thats often where binary-only games end up) due to the fact of the large files that games often use.

A note about putting everything on Ext2... if your system reboots unexpectedly, it will take a LOOooong time to reboot due to the necessary FSCK to make the drives safe.  His note that journalling slowing things down is wrong, journalling allows for better handling of multiple writes tot he same place and speeds up file-system mounting greatly.

The anticipatory block scheduler works great for ensuring that your HD performance is maxxed out.

Also, a note on your noticing X using ~100 MB... don't trust what you see as the memory usage unless you check out the "private writable" section.  W/ X, it maps your graphics memory into its memory space, so you probably have like a 64 meg card mapped in.

If you're using NVidia, be sure to use their binary drivers... that's the only way to go really for 3d.

Well.. thats my loaded 2cents.

----------

## MetX

Oh, forgot to note, gentoo-sources are better than vanilla-sources because it includes fixes made by gentoo's team.

----------

## apmurray

 *MetX wrote:*   

> Oh, forgot to note, gentoo-sources are better than vanilla-sources because it includes fixes made by gentoo's team.

 

What?? That doesnt necissarily mean it is better!! Personally I use it, but to say that it is better because it has fixes made by the gentoo team is completely unfounded.

----------

## MetX

 *apmurray wrote:*   

>  *MetX wrote:*   Oh, forgot to note, gentoo-sources are better than vanilla-sources because it includes fixes made by gentoo's team. 
> 
> What?? That doesnt necissarily mean it is better!! Personally I use it, but to say that it is better because it has fixes made by the gentoo team is completely unfounded.

 

Unfounded?

It's "better" because it may have stability fixes that were found later in the vanilla kernel, basically the whole reason for there being a gentoo-kernel (besides SquashFS and the bootscreens).

----------

## i92guboj

I know nothing about what that concrete fixes are. But at least for me, and im talking about my personal experience, vanilla sources are the most stable sources. I have not found a reason to use gentoo-sources (I used them when first installed gentoo, so, the thing might have changed, I dont know) except for the bootsplash, which I personally dont use. When it comes to console, I preffer a plain black and readable background, since every framebuffer jpeg background has it own readability issues (overall when using prorams with coloured text output).

Anyway, also ck, morph, and all the rest are supposed to have some performance fixes, and they have probed not to be relliable, so, "he more fixes" does not mean necessarily "the best kernel".

----------

## vipernicus

better is an opinion.  sometimes opinions are based on facts, and sometimes they are not.

----------

