Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
10-05-2012, 12:29 PM
|
#1
|
|
LQ Newbie
Registered: Oct 2012
Distribution: Slackware64 14.0
Posts: 10
Rep: 
|
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.
|
|
|
|
10-05-2012, 12:44 PM
|
#2
|
|
Member
Registered: Feb 2004
Distribution: Slackware
Posts: 185
Rep:
|
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.
|
|
|
|
10-05-2012, 12:48 PM
|
#3
|
|
Senior Member
Registered: Jul 2007
Distribution: Slackware64-14.0
Posts: 2,212
|
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.
|
10-05-2012, 01:43 PM
|
#4
|
|
LQ Newbie
Registered: Oct 2012
Distribution: Slackware64 14.0
Posts: 10
Original Poster
Rep: 
|
...
Thanks guys. I'll def. try passing -j3. for this compile.
|
|
|
|
10-05-2012, 01:51 PM
|
#5
|
|
Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 5,369
|
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?
|
|
|
|
10-05-2012, 03:15 PM
|
#6
|
|
LQ Newbie
Registered: Oct 2012
Distribution: Slackware64 14.0
Posts: 10
Original Poster
Rep: 
|
...
Quote:
Originally Posted by business_kid
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
|
|
|
|
10-05-2012, 04:53 PM
|
#7
|
|
Senior Member
Registered: May 2008
Posts: 2,880
|
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.
|
|
|
|
10-05-2012, 10:41 PM
|
#8
|
|
LQ Newbie
Registered: Oct 2012
Distribution: Slackware64 14.0
Posts: 10
Original Poster
Rep: 
|
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.
|
|
|
|
10-06-2012, 12:35 AM
|
#9
|
|
Senior Member
Registered: Jul 2011
Distribution: Slackware64-14.0, LFS-7.3, FreeBSD 9.1
Posts: 1,175
|
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.
|
|
|
|
10-06-2012, 01:16 AM
|
#10
|
|
LQ Newbie
Registered: Oct 2012
Distribution: Slackware64 14.0
Posts: 10
Original Poster
Rep: 
|
Quote:
Originally Posted by ReaperX7
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.
|
|
|
|
10-06-2012, 03:27 AM
|
#11
|
|
Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 5,369
|
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.
|
|
|
|
10-06-2012, 06:12 AM
|
#12
|
|
Member
Registered: Sep 2012
Location: Hong Kong
Distribution: Slackware14 (3.7)
Posts: 51
Rep: 
|
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.
|
|
|
|
10-06-2012, 07:23 AM
|
#13
|
|
Moderator
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Slackware, Debian
Posts: 12,525
|
Quote:
Originally Posted by ReaperX7
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.
|
|
|
|
10-06-2012, 07:26 AM
|
#14
|
|
Guru
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,706
|
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.
|
|
|
|
10-06-2012, 07:50 AM
|
#15
|
|
Member
Registered: Apr 2010
Distribution: Slackware
Posts: 313
Rep:
|
Quote:
Originally Posted by r.vaillancourt
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)
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:43 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|