Kernel Compile time

Soldato
Joined
15 Sep 2003
Posts
9,454
How long does the average kernel take to compile? I'm running debian 5 in a vm with 512mb ram and two cpu cores.

Its been 40 mins so far and I don't know how far in it is.

Cheers,

Jon
 
Woah thats far too long! (well depends on a few things, like what cpu are you running and how many options did you choose? ie creating lots of modules and picking out lots of drivers makes compiling take a lot longer).

Gentoo's kernel specifically for my main computer takes a min or two....
 
I thought I copied the previous kernel options and greated a new one.

The VM is on my vista laptop with a dual core 1.66 and 4gb of ram so it shouldn't be "that" slow.


It's still going.
 
Humm strange... Shouldnt really be taking that long at all.

Why are you creating a new kernel with the same options as the old ones?
 
I cancelled it and started again. I'm just messing around really putting a newer kernel on with the same settings. I think I missed the .config file I created on the first compile and therefore was compiling a lot more.

Jon
 
If you took the .config from your distro's genkernel, then it will take ages.

As pingwing mentioned above - if you're building a kernel for a specific box (and therefore don't need all the generic rubbish they put in the stock kernels), you can build one in about 2 or so minutes on a reasonably modern pc.
 
I've read of a few people having incredibly long compile times when doing it in a VM.
Never tested it myself but I thought I'd mention it.
 
JonRohan

What is the total RAM for your system and is that a Core 2 CPU, Athlon-64 X2, or what? Also does the CPU have hardware virtualisation acceleration?

Good luck! It's a great learning experience compiling your own kernels up (I found anyway!!) :D

Bob
 
Last edited:
JonRohan

What is the total RAM for your system and is that a Core 2 CPU, Athlon-64 X2, or what? Also does the CPU have hardware virtualisation acceleration?

Good luck! It's a great learning experience compiling your own kernels up (I found anyway!!) :D

Bob

Hi,

My laptop has 4gb Ram and a Core 2 Duo 1.67 CPU. Pass on the hardware virtualisation.

The first compile took ages because I used the exisiting config with a load of drivers I didn't need.
 
Hi,

My laptop has 4gb Ram and a Core 2 Duo 1.67 CPU. Pass on the hardware virtualisation.

Plenty of RAM there. But I guess that a single threaded kernel compile will be hampered a little bit by the CPU clock speed there.

I have found (on an Athlon 64 dual-core system anyway) that native compilation of a Linux Kernel with lots of drivers enabled does take quite a while to compile!! I just leave it running overnight myself... :D

BTW Intel® Mobile Core™2 Duo Processor Virtualisation (VT-x) Support
For example VirtualBox has a switch "VT-x/AMD-V" that will enable virtualisation acceleration if present in the CPU. I unfortunately have early Opteron/Athlon-64 systems (socket 939/940) that predate support for this feature!! :(

Bob
 
Probably 2 or 3 hours the 1st time on a vm on an average machine these days.

Once it has done it once, future runs will only compile things that have changed, then package it all, so about 20 mins.
 
Seems way too long..
I got the 2.6.30-rc8 yesterday, compilation of that took maybe 4-5 minutes at most.
Although I was aiming for a lighter build in my makeconfig, and I have a phenom 2 so that'll speed things up slightly!
 
Recompiled my kernel last night, took about five hours on an old P4 (2.8GHz).

However, there's still loads of stuff in there that I don't need (mainly drivers for all manners of hardware) - so I'm going to have to go through it again.

Has anyone got tips for what stuff to remove?
 
Back
Top Bottom