Jump to content
hick518

Minimizing compile time

Recommended Posts

I plan to install Funtoo on some low-spec hardware (a P4 laptop with 512MB of RAM).  It will have the LXDE desktop, a web browser, LibreOffice, and not much else running on it.  I will be running "stable" rather than "current", in an effort to reduce the amount of updates I see.

 

Are there any suggestions for minimizing compile times?  Any USE flags I should be specifying to strip out unneeded features?  Any clever use of of package sets to avoid updating packages that are not security-related?

 

I'm brand new to Funtoo, so I might be missing some obvious techniques.  Don't be afraid to insult me with basic suggestions.

 

Share this post


Link to post
Share on other sites

I can offer a few beginner suggestions.

 

You can reduce compiling time by not compiling larger packages and use the pre-compiled binaries for the web browser and LibreOffice.

This link should help with the web browser offerings.  http://www.funtoo.org/Web_Browsers

 

USE flags really depends on a lot of things, but since you want to use LXDE, you can "opt out" from the other major ones that bring in a lot of fluff.

 

/etc/portage/make.conf

USE="-gnome -kde"

VIDEO_CARDS="specific for your system (i.e. radeon)"

 

http://www.funtoo.org/Make.conf

 

That was where I started, later I learned from looking at what emerge said would get pulled in, and asking on IRC.

You can pretend to do the emerge (install) and that really helps to see what will get pulled in or changed.

 

I am sure others will chime in with specifics, like compiling on a different machine, etc.

Share this post


Link to post
Share on other sites

I have a Toshiba TE2000, it's a P4, 15 years old and keeps on ticking, even the CDROM!  I don't think you'll find this is much of an issue once you get over the initial install, it's not that horribly slow.

I believe LXDE is a good choice, mine is openbox with  lxpanel, etc., I think LXDE IS openbox if I remember correctly.

The biggest help you can give it is to use ccache and DISTCC - if you have other machines to help.  ccache irregardless of other machines.  Lots of info about those at the wikis and forums.

swamprabbit's suggestion is excellent too.  There is also the tinderbox, the developer says it's not maintained anymore, but it seems to have recent activity: http://tinderbox.dev.gentoo.org/.  Binary compiles of many packages.  I've never used tinderbox, but I do use the binary browsers, they are a very time consuming compile.

Also if you can spare a few bucks, mine was 1GB ram, I got 2GB on ebay for something like $12-13, new even.  That helped it alot.

It's likely you have a tiny HD, if need be it's easy to put /usr/portage on a usb stick.  Or if you do have other machines you can just link to /usr/portage through NFS or samba, that's what I do here.

Oh, 1 more thing you can do if you increase memory size.  You can run /var/tmp/portage as a ramdisk, should be much faster than storing intermediary compiled programs on disk, reading them back, etc. (although I must confess lately I'm not so sure).  To do this you make an entry like this in /etc/fstab:

tmpfs			/var/tmp/portage tmpfs		size=2G         0 0

Don't worry about the 2G, it's smart and only uses what's available for the ramdisk.

However, a handful of packages cannot fit into such a small size and you will have to make exceptions for them thusly:

cat /etc/portage/package.env

app-office/libreoffice						notmpfs.conf
app-text/poppler							notmpfs.conf
cat /etc/portage/env/notmpfs.conf
PORTAGE_TMPDIR="/var/tmp/notmpfs"

Then portage will use a "real" temporary directory for those packages.  These are examples only, for example, you would almost surely want libreoffice-bin, the compiled version is the king of long compile times.  You'll find out what needs to be added to package.env when it says "out of disk space" when it fails ;)

Share this post


Link to post
Share on other sites

Thanks for the suggestions, swamprabbit and sputnik. 

 

Is there somewhere I can get a list of all the possible USE flags?   Edit:  Nevermind.  I found this at /usr/portage/profiles/use.desc and us.local.desc.

 

And sputnik -- yes, LXDE is Openbox with some extra stuff pre-configured (a panel, wallpaper, some recommended apps, etc.) 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...