# Extremely long compilation time on p2 laptop

## funkyade

Hi,

Been compiling a kernel on an old P2 based laptop since early this morning and it is still going (approx 14 hours) currently at 'net/ipv4/netfilter! Is this a normal length of time for a kernel compilation on a machine of this age (P2-266)? Never known it to take this long in the past, longest was 2.5 hours on a ppc mac (ibook 500). Have pared down the kernel to the basics, so am mystified as to why it is taking so long. Anybody got any ideas?

thx

----------

## doubleagent

CFLAGS?

----------

## hans0r

CFLAGS don't affect kernel compilation.... unless they borked the build system somehow

----------

## funkyade

OK, it's finished after 16 hours and 35 minutes... :-O

Thanks for the responses.

Normally, I wouldn't be too concerned with this, however, I'm going to be compiling a few kernels on older hardware as I'm setting up an OpenMosix cluster - this particular laptop was/is going to be the head node - and every machine in the cluster is different (no PXE)...

I suppose I could make kernels on a faster machine and port them over...

Still baffled about the time for this one though.

make.conf is pretty standard, CFLAGS are "-Os -pipe -march=pentium2 -mmmx", incidentally.

EDIT: kernel sources are "gentoo-sources" for this particular kernel, openmosix sources comes later...

----------

## bollucks

Perhaps during the compile it started hitting swap pretty hard. That can slow down any machine now matter how fast the cpu. Just a guess really. Did you use a job number for the make? (-j N) That would increase dramatically the amount of ram used.

----------

## funkyade

yeah, have -j2 defined in make.conf as is the norm... will change it to -j1 for the next one to see if it makes a difference.

didn't think about the swap issue, interesting point.

----------

## eccerr0r

Kernel compile times has been weird for me.  My times started out at around 4.5 hours on a 386DX40/4M/40M HDD which quickly dropped to just over an hour with a faster hard drive... and dropped more when I got 8M of RAM.  Keep in mind this was linux-1.0 era.

When I had a machine of that caliper (PPro at 200MHz probably would be my closest, somewhere around 32 to 64MB RAM) my compile times were around the 20 minute mark - on a 1.2 kernel.  My guess is that with a 2.6 kernel it would have gone up again towards the 30 minute mark not counting gcc bloat.  If you have enough RAM free and a decent hard drive (not some crappy 2:1 interleave PIO2 ATA1 HDD like what I had at first in the 386DX40), 16 hours is quite excessive.  I think my 16.6MHz DECstation 3100 takes 5 hours to compile current NetBSD kernels with 24MB!  And recent Laptop hard drives don't count as "crappy!" (make sure HDD DMA is on too if it's supported!)

Normally if I estimate a computer would take more than 30 mins to compile a kernel, I'd dump it on one of my faster machines to compile  :Smile: 

----------

## NeddySeagoon

funkyade,

PXE, you are going soft. etherboot on a floppy disk or find network cards that take a boot PROM and blow a PROM to get network booting.

----------

## funkyade

Hiya

Yeah, I'd initally thought of doing PXE, but the laptop only has a crappy 16bit-PCMCIA network card, no built-in. And as far as I can tell PXE/netboot isn't supported.

I've created a chroot on a faster machine with appropriate settings for each machine. Basically, I'm updating a stage3, taking a snapshot and then compiling the kernel in the chroot then using SSH to untar the whole chroot onto the new machine. The downside of this is that I can only do one at a time, I had intended to do each machine at the same time but when you have kernel compilation staking 10 hours plus it gets a bit tedious... Once I get enough machines going I'll look into using distcc.

Thanks for the responses guys!

----------

