• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

A couple of Gentoo questions

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.
Usually it is that simple. Certain packages are picky, though, and won't work unless the package and libraries are all compiled using the same option, which means you may have to recompile everything. Make sure you set up ccache, you'll need it with a Celeron.
 
It's not really hard to change compiler optimization flags. It can be time consuming though, as everything must be rebuilt.
 
I disagree with this. I would never consider using -Os on that machine. It's far too powerful.
-Os disables only 6 of the 26 optimizations enabled by -O2. All but two of those disabled optimizations have to do with alignment. Os and O2 are very similar optimization levels, and a system would likely perform very similarly with either.

JigPu
 
And the CPU has a 256K L2 cache. I've always understood that -Os was for small caches such as that one. If it isn't, give me links to correct myself.
 
You're not wrong in that a smaller cache is one of the reasons you use Os. The others are disk space and RAM. The basic idea is just that if the binary is smaller, it effectively makes the disk, RAM, and cache all hold more.

See http://gentoo-wiki.com/Safe_Cflags#Celeron_.28Willamette.29

This is a 1.7 ghz celeron, and the recommended setup is:
Code:
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}
Also from that page:
Code:
Note that [URL="http://www.gentoo.org/doc/en/faq.xml#optimizations"]-O2[/URL]
is regarded as safer than "-O3", and "-O3" can often be a
counter-productive attempt at optimization. On computers with limited
cache and/or memory, "-Os" may provide better performance in some cases
through smaller binaries, although it is slower when using the OpenSSL
library with small keys (DSA keys with less than 2048 bits on VIA C3-2,
1200 MHz and 64 kb on-die cache).

Cache is one of those things that helps a LOT if you go from 0 to a small amount, but the returns decrease substantially as you add more and more cache. For example, consider the Athlon XP's. The Barton is basically a Tbred-B with 512k on die cache instead of 256k. In many cases, Bartons with higher ratings were outperformed by lower rated Tbred-B's... going from 256k to 512k has a subtle (but sometimes noticeable) effect. Adding more cache just means that less probable portions of the RAM get cached, so the increase in cache hit rate is subtle.

256k is more than enough cache for -Os to not be worth it. The quote above suggests -Os basically in a case where cache is 64k (that's pretty small). 256k is a decent sized cache, and a P4 Celeron at 2.0 ghz is not a weak processor. Sure, it's no C2Q, but it's not bad at all. Nowadays, lots of cache is being added to almost useless levels. The performance increases are becoming infinitessimal from added cache.

I run a number of Athlon XP's still (some Bartons, some Tbred-B's, a few Palominos) and -O2 is faster than -Os.

I wouldn't use -Os on anything newer than a P2 / K62 (and even then I'm not sure it would benefit you... but I'd have to test) unless they were very low on RAM or disk space.

Os rarely has any uses now. It was more useful some years back when there were still a lot of 64k cache cpu's lying around.
 
Well, I'm getting started sooner than the weekend on this. I'm sure I'll have more questions as I go along, but so far the handbook has been pretty easy to follow :)

Oh, how long should it take to get control back after you download the stage 3 tarball? I've been sitting for like 5 minutes already since it finished receiving the file. I am getting HDD activity though, so I'm not too worried yet.
 
Last edited:
I don't see any reason you'd be waiting for anything. Once it is done downloading, you should be able to keep going.
 
well, I'm not sure what's going on then. I powered off, and went back through the steps all the way to downloading the tarball again, but after it completed I still haven't been given back to the command line. What I see on the screen is
Code:
p1 of 5735
[I assume that's the actual tarball file that's reading out below that], and at the very bottom it says:
Code:
Received 117 MB of 117 MB, avg 552 kB/s, cur 698 kB/s

And then the cursor is blinking in the very bottom right corner. My cpu fan is kicked up on high like it's working on something, but I'm not getting HDD activity anymore. Also, the screen just blacked out for screen saver mode.
 
ok, not sure what it means, but I just got some stuff that started with
Code:
init invoked oom-killer:
and then finished off with
Code:
Killed process 15087 (links)
I still don't have a command line prompt though.
 
Well, you can do alt-f2 and that will give you a new terminal. Then you can verify the download is complete (not increasing in size, use ls -l). If it is, then just work on the other terminal, or go back to the first and hit ctrl-c. I'm not sure why yours decided to hang at all, but it's not really a full crash, it's easily fixable.
 
oom is out of memory. Not sure what would cause links to do that. Try the following:

Code:
wget http://gentoo.mirrors.tds.net/pub/gentoo/snapshots/portage-latest.tar.bz2.md5sum
wget http://gentoo.mirrors.tds.net/pub/gentoo/snapshots/portage-latest.tar.bz2
wget http://gentoo.mirrors.tds.net/pub/gentoo/releases/x86/2008.0/stages/stage3-x86-2008.0.tar.bz2.DIGESTS
wget http://gentoo.mirrors.tds.net/pub/gentoo/releases/x86/2008.0/stages/stage3-x86-2008.0.tar.bz2

EDIT: Try that if you find that links failed to download them. You can then check to make sure they downloaded correctly by running:

Code:
md5sum -c *.md5sum
md5sum -c *.DIGESTS
 
Well, I'm not sure how long I should sit and wait for it, but I can't get the first terminal to quit using ctrl-c, and the alternate terminal isn't responding either.
 
How much ram does the pc have? Did you set up a swap partition? Did you use the "swapon" command to turn swap on?

It shouldn't be an issue unless the pc has very little ram. I've never encountered it, and I built Gentoo on a P1 233 (although it did have 192MB RAM, which isn't horrible).
 
It has 768Mb of RAM, and I'm only sharing 8Mb for video. I've put it on hold for tonight, but tomorrow I'm going to try it using wget rather than links like petteyg suggested.

I setup a 512Mb swap partition, and I did use swapon to enable it.
 
I don't have a make.conf yet, installing the portage snapshot was the next step after the stage 3 tarball in the handbook. So far though, using wget seems to be working.
 
Last edited:
oh, now that I'm to the point in the handbook of editing make.conf, I set MAKEOPTS="-j2"
 
Last edited:
Back