LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-05-2012, 12:29 PM   #1
r.vaillancourt
LQ Newbie
 
Registered: Oct 2012
Posts: 20

Rep: Reputation: 0
Arrow Compiling very slow


Just installed slackware 14, switched to the generic-3.2.29 kernel and recompiled the kernel using generic-config per Alien Bob's instructions. Compiling the kernel TOOK 4 1/2 HRS. Tried searching here and google not much help, mostly very outdated info. any help will be appreciated.
 
Old 10-05-2012, 12:44 PM   #2
animeresistance
Member
 
Registered: Feb 2004
Distribution: Slackware
Posts: 191

Rep: Reputation: 20
Hmmm ...

I think it is kinda weird ... i think that one of the most heaviest thing to compile is the kernel. I used to compile it in 6 hours (of course it was an old bones P3 with 1 GB in ram (it's still working)). So i think it is normal, unless you have a great machine and a great processor with too much RAM.

But i could be wrong.
 
Old 10-05-2012, 12:48 PM   #3
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,252

Rep: Reputation: 631Reputation: 631Reputation: 631Reputation: 631Reputation: 631Reputation: 631
Since your CPU has two cores, you may get some speed gains by passing "-j3" to make, as in
Code:
make -j3 bzImage modules
A kernel compile takes a long time, and while it doesn't take 4.5 hours here on a desktop AMD Phenom II X4 processor with 4 cores, I can imagine a laptop APU with two cores would take a bit of time. You can try compiling on a tmpfs partition to minimize disk I/O, though I am unsure if 4 GB of RAM would be enough to hold the source and provide enough RAM for the compile without falling to swap (it may be, I'm just unsure). If you didn't parallelize make the first time then you should definitely see *some* speed gains with the above-mentioned -j3, anyway.
 
1 members found this post helpful.
Old 10-05-2012, 01:43 PM   #4
r.vaillancourt
LQ Newbie
 
Registered: Oct 2012
Posts: 20

Original Poster
Rep: Reputation: 0
...

Thanks guys. I'll def. try passing -j3. for this compile.
 
Old 10-05-2012, 01:51 PM   #5
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,381

Rep: Reputation: 557Reputation: 557Reputation: 557Reputation: 557Reputation: 557Reputation: 557
I recompiled 3.2.29 and it took me about 16 minutes on a twin core 2Ghz turion cpu w/3G ram.

I have had the slow kernel compile problem with slamd64. It transpired the original (2.6.33?) kernel had every 32 bit bugfix, and no 64 bit acceleration compiled in. I emailed Fred Emmot and earnestly suggested forking the kernel and he obliged, which reduced kernel compile time to 15 minutes.

You are not compiling every module for every card ever built, are you? Just what's in the box? You have memory, and swap in abundance? No strange bootup messages?
 
Old 10-05-2012, 03:15 PM   #6
r.vaillancourt
LQ Newbie
 
Registered: Oct 2012
Posts: 20

Original Poster
Rep: Reputation: 0
...

Quote:
Originally Posted by business_kid View Post
You are not compiling every module for every card ever built, are you?
Just what's in the box?
You have memory, and swap in abundance?
No strange bootup messages?
Using the generic-config out of the box.

System specs in signature.

4GB mem 8GB swap.

I don't think so, need to check dmesg though. Screen goes blank for a few seconds when booting up
but thats about it other than the system seems a bit slugish
 
Old 10-05-2012, 04:53 PM   #7
GazL
Senior Member
 
Registered: May 2008
Posts: 3,392

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
3.2.30 built on 3.2.29 using Pat's 'generic' config

x86_64 Intel(R) Core(TM)2 Duo CPU E7400 @ 2.80GHz

real 33m44.698s
user 56m57.314s
sys 6m35.024s


Make -j2 is enough to keep both cpu's pegged at 100% as I build in /tmp (tmpfs) and there isn't any i/o wait to speak of.

You can probably knock off a minute though as my script also runs a makepkg on it, which adds a little time.

Last edited by GazL; 10-05-2012 at 05:06 PM.
 
Old 10-05-2012, 10:41 PM   #8
r.vaillancourt
LQ Newbie
 
Registered: Oct 2012
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks

Thanks guys, -j3 cut the compile time down to 2hrs. 15min.. Now to figure out which modules I can live w/o.
Its been a couple of minutes since I last played with Slack (10.2 I believe).
Appreciate the quick responses guys. Take care.
 
Old 10-06-2012, 12:35 AM   #9
ReaperX7
Senior Member
 
Registered: Jul 2011
Distribution: LFS-SVN, FreeBSD 10.0
Posts: 3,206
Blog Entries: 15

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
There are several things you can do to speed up a kernel compile but not much realistically.

"make -jX" flags are one of the most common but you can also try increasing the stack using "ulimit -s XXXXX" with a value like 32768 or another multiple thereof. This won't cut it down dramatically in time though. In fact it might only shave off a few seconds.

Really, your CPU's overall power and cores will determine how well this works.

Also, when using the make -jX flag only set the #X amount equal to the number of cores you have. If you go over even by one you'll end up with make using the swap more and more.

If you want to know how long it will take visit the LFS project's page and see their Standard Build Unit (SBU) calculation.

1 SBU is equal to about 15 minutes on a Dual-Core 2.5 GHz AMD Athlon X2 CPU with 4GB RAM with the make -j2 flag enabled. The kernel takes at LEAST up to 5 times this amount to completely build. Calculate that out against a slower CPU, even with more cores and more RAM, and it will vary.

Last edited by ReaperX7; 10-06-2012 at 12:40 AM.
 
Old 10-06-2012, 01:16 AM   #10
r.vaillancourt
LQ Newbie
 
Registered: Oct 2012
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ReaperX7 View Post
There are several things you can do to speed up a kernel compile but not much realistically.

"make -jX" flags are one of the most common but you can also try increasing the stack using "ulimit -s XXXXX" with a value like 32768 or another multiple thereof. This won't cut it down dramatically in time though. In fact it might only shave off a few seconds.

Really, your CPU's overall power and cores will determine how well this works.

Also, when using the make -jX flag only set the #X amount equal to the number of cores you have. If you go over even by one you'll end up with make using the swap more and more.

If you want to know how long it will take visit the LFS project's page and see their Standard Build Unit (SBU) calculation.

1 SBU is equal to about 15 minutes on a Dual-Core 2.5 GHz AMD Athlon X2 CPU with 4GB RAM with the make -j2 flag enabled. The kernel takes at LEAST up to 5 times this amount to completely build. Calculate that out against a slower CPU, even with more cores and more RAM, and it will vary.
1hr. 15min. is a little more tolerable, but I'm not putting all my eggs in that basket (1900Mhz x2). Would be nice though.
I will look into the LFS SBU.
 
Old 10-06-2012, 03:27 AM   #11
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,381

Rep: Reputation: 557Reputation: 557Reputation: 557Reputation: 557Reputation: 557Reputation: 557
On paper, you and I have fairly similar boxes (AMD cpu, chipset, graphics). My time was for the command
time make
which does the bulk of the work. If you're up over the hour, something's wrong. I have a 667Mhz bus (advertising spec) and a 7200 rpm drive (HP Compaq 6715S).

There's nothing major wrong with Pat's generic kernel, if you have an initrd. One possibility that springs to mind is that you don't have the chipset driver in there, and you're not getting full speed out of the disk. Try your speed with this command

sudo hdparm -tT /dev/sda

Mine does 755MB/s cached and 61.57MB/s direct. If yours is a lot off that, that could be the issue.
 
Old 10-06-2012, 06:12 AM   #12
688a
Member
 
Registered: Sep 2012
Location: Hong Kong
Distribution: Slackware14 (3.7)
Posts: 51

Rep: Reputation: Disabled
Think about this, it takes me 1 and 1/2 hrs to slackbuild (I suppose it did compiling...) the browser chromium, so taking 4 hrs and more for a core system seems ok to me.



Btw, just curious, is your machine running faster after you built your own kernel?

Last edited by 688a; 10-06-2012 at 06:18 AM.
 
Old 10-06-2012, 07:23 AM   #13
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046
Quote:
Originally Posted by ReaperX7 View Post
Also, when using the make -jX flag only set the #X amount equal to the number of cores you have. If you go over even by one you'll end up with make using the swap more and more.
I usually use -j10 on my 6-core machine (no Hyperthreading, compiling in RAM to make I/O a non-issue) and can't confirm that behavior.
 
Old 10-06-2012, 07:26 AM   #14
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
I also use -j with the number of cores I have mostly to be able to do other things while its compiling, like browsing the web, without major slowdown.
 
Old 10-06-2012, 07:50 AM   #15
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 345

Rep: Reputation: 56
Quote:
Originally Posted by r.vaillancourt View Post
Thanks guys, -j3 cut the compile time down to 2hrs. 15min..
doesn't sound right to me. On my Core i7 systems it takes 1min 55s. With distcc I can do it in 1 min 10s. All this without slowing down my desktop activities due to scheduling class SCHED_IDLEPRIO.

If memory serves correctly, my pentium 3 machines used to to it in like 15 min, maybe a bit more. Admittedly I build custom kernels which are a lot smaller than distro kernels, but 2hrs 15min on a machine with two cores at 1900 MHz still doesn't sound right.

Last edited by Martinus2u; 10-06-2012 at 10:45 AM. Reason: newly measured performance figures (taken just now)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SquidGuard very slow compiling lists z-man5 Linux - Software 1 08-21-2007 10:04 AM
Suse 9.2 & SATA - Slow, Slow, Slow jess1975 Suse/Novell 6 01-28-2007 12:17 PM
New Fedora Internet connection slow slow slow matrim Fedora 9 07-29-2005 01:39 PM
slow system after compiling Xfree86 4.3... John Silva Linux - Software 0 10-25-2003 04:59 PM
RH8 vs. W2k - Slow, slow, slow zerojosh Linux - Software 2 06-30-2003 07:19 PM


All times are GMT -5. The time now is 03:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration