3. Compiler Speed-up

If your machine has 16 or more Megabytes of RAM, there is a useful speed-up that can be done, which is to permit the kernel to compile two or modules in parallel. This will increase the load on the machine whilst the kernel is being recompiled, but will reduce the time during which the compilation will be taking place.

Before you can use this method, you need to check the amount of RAM present in your machine, as if you set this too high, the compilation will actually slow down. Experience has shown that the optimum value depends on the amount of RAM in your system according to the following formula, at least for systems with up to 32 Megabytes of RAM, although it may be a little conservative for systems with larger amounts of RAM:

N = [RAM in Megabytes] / 8 + 1

For the benefit of those with a dislike of math, the values for the common amounts of RAM are as follows:

Table 1. Sample Table

RAM SizeValue to Use
16 Megs3
24 Megs4
32 Megs5
40 Megs6
48 Megs7
56 Megs8
64 Megs9
80 Megs11
96 Megs13
112 Megs15
128 Megs17

When you have decided on the correct number, edit the file /usr/src/linux/Makefile and find the line that currently reads:

MAKE=make
    

Replace it with one reading:

MAKE=make -j N
    

where N is the number determined above.

mirror server hosted at Truenetwork, Russian Federation.