Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOWTO] Flying with gentoo
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
asph
l33t
l33t


Joined: 25 Aug 2003
Posts: 741
Location: Barcelona, Spain

PostPosted: Thu Oct 07, 2004 11:30 am    Post subject: Reply with quote

little update, more to come :)

thanks for the posts, suggestions and corrections
_________________
gentoo sex is updatedb; locate; talk; date; cd; strip; look; touch; finger; unzip; uptime; gawk; head; emerge --oneshot condom; mount; fsck; gasp; more; yes; yes; yes; more; umount; emerge -C condom; make clean; sleep
Back to top
View user's profile Send private message
Pseud
Apprentice
Apprentice


Joined: 19 Mar 2004
Posts: 273
Location: Bangalore, India

PostPosted: Thu Oct 07, 2004 8:59 pm    Post subject: Reply with quote

rotflmao @ mvila's signature
_________________
eschew obfuscation
Back to top
View user's profile Send private message
b-o-s-s
n00b
n00b


Joined: 14 Jul 2003
Posts: 36

PostPosted: Thu Oct 07, 2004 9:05 pm    Post subject: Reply with quote

This is a very nice howto, thanks mvila!

However, there's one point I don't feel comfortable with. You write:
Quote:

Another concept to know about is swappiness (kernel 2.6+). When an application needs memory and the RAM is full, there are two options: or the RAM gets empties a little bit cleaning out old used memory, or swap memory gets used (slower than ram). In the new kernels, you can set a variable to define if the kernel should empty some ram or use the swap partition.


I think this explanation is somewhat misleading. In my opinion (which could be totally wrong), swappiness affects the rate, at which a potentially growing page cache may force user pages to swap. (at least it should)

Basically, the page cache is memory, where linux caches nearly everything, and this is independent of it's likeliness to be needed again. Then there comes the point where the page cache would grow beyond free physical memory. A decision has to be made whether the page cache should grow anyway, which may mean putting even running applications to swap, or to keep the page cache's size and replace some entries in it. The good point in not growing the page cache is, this doesn't force applications to swap, but the bad point is, page cache entries might be thrown away that are needed again shortly (and thus have to be reread from disk). So this is a serious tradeoff, which can be manipulated through the tunable swappiness. (/proc/sys/vm/swappiness)

A very distressing fact about swappiness comes from a discussion I read on www.kerneltrap.org, where someone (can't remember) figured out, that from kernels > 2.6.6, swappiness isn't been honoured correctly. This means, swappiness has little, even unexpected influence on the above described decision. swappiness 0 should mean "never swap out user pages in favour of page cache growth" and 100 should mean "always favour page cache growth". Note that this is part of the old tradeoff between "overall throughput" and "desktop interactivity". Unfortunately, on kernels > 2.6.6 even swappiness 0 leads to swapping out user pages for a growing page cache and in general, the swappiness value is totally incomprehensible. (Although I don't know if this is really a bad thing. Ideally, something like swappiness shouldn't be needed at all)

Hope I got this all right, so feel free to correct me.

Oh, and one last thing. You recommend considering acovea for getting the optimal CFLAGS. I don't agree with this. While a very nice concept, I don't think the very special CFLAGS acovea spits out, are suited for compiling a whole system. In fact, I think it actually leads to worse performance, but this claim deserves a thread of its own...
Back to top
View user's profile Send private message
vdboor
Guru
Guru


Joined: 03 Dec 2003
Posts: 592
Location: The Netherlands

PostPosted: Fri Oct 08, 2004 9:23 am    Post subject: Re: [HOWTO] Flying with gentoo Reply with quote

mvila wrote:
/etc/init.d/localmount

change:
Code:
mount -at nocoda,nonfs,noproc,noncpfs,nosmbfs,noshm >/dev/null

for:
Code:
mount -aFt nocoda,nonfs,noproc,noncpfs,nosmbfs,noshm >/dev/null

The will start all the local mounts at the same moment, not one after the other.


I've noticed this new mount command gives problems with mount points depending on each other, for example:

Code:
/usr/local/opt  /opt     none  auto,bind   0  0


I haven't found any solution for this in the mount manual. In fact, the manual even states:
Quote:
A disadvantage is that the mounts are done in undefined order. Thus, you cannot use this option if you want to mount both /usr and /usr/spool.


To bad :(
_________________
The best way to accelerate a windows server is by 9.81M/S²
Linux user #311670 and Yet Another Perl Programmer

[ screenies | Coding on KMess ]
Back to top
View user's profile Send private message
BlindSpy
Apprentice
Apprentice


Joined: 20 Mar 2004
Posts: 263

PostPosted: Fri Oct 08, 2004 12:53 pm    Post subject: Reply with quote

wow this guide is completely amazing! i love it when you vets share your secrets =)
_________________
Symlinks to:
xorg.conf
Back to top
View user's profile Send private message
c0balt
Guru
Guru


Joined: 04 Jul 2004
Posts: 441
Location: Germany

PostPosted: Fri Oct 08, 2004 2:27 pm    Post subject: Reply with quote

A way to speed up emerge (calculating dependencies, searching etc) that has been floating around the forums for some time:

Code:
emerge psyco


add in /usr/bin/emerge (somewhere at the beginning)
Code:
try:
    import psyco
    psyco.full()
except ImportError:
    pass


ive never comprehensively tested it, but it feels faster.
It has to be done after every portage update though (USE flag would be cool)[/code]
Back to top
View user's profile Send private message
massctrl
Apprentice
Apprentice


Joined: 19 Mar 2004
Posts: 156

PostPosted: Fri Oct 08, 2004 3:14 pm    Post subject: Reply with quote

Hi all,

I'm especially interested in the centrino flags etc,..

The thing is, if you want to do a stage 1 install using the 2004.2 livecd you need to install the latest C-compiler first ,since the version on 2004.2 doesn't support the pentium-m flag?

I'm getting an error when bootstrapping the system, this is caused by this pentium-m flag.

Anyone with tips about this issue?

Thanks in advance

Massctrl
Back to top
View user's profile Send private message
JanErik
Guru
Guru


Joined: 28 Oct 2002
Posts: 488
Location: Finland

PostPosted: Fri Oct 08, 2004 3:31 pm    Post subject: Reply with quote

One more interesting thing could be nscd, or Name Service Cache Daemon. Should give faster web since it doesn't have to do a DNS lookup for visited URLs.

/etc/init.d/nscd start

or

rc-update add nscd default
Back to top
View user's profile Send private message
TheKat
n00b
n00b


Joined: 24 Jan 2004
Posts: 49

PostPosted: Mon Oct 11, 2004 12:13 pm    Post subject: Reply with quote

Quote:
As for the CXXFLAGS, -fvisibility-inlines-hidden has been reported as a good flag to improve the C++ compiles (thx teutzz).

Is there a specific GCC version for those? GCC 3.3.4 dies with -fvisibility-inlines-hidden.
Code:
cd ../obj_s;  /usr/bin/g++ -I../c++ -I../include -I. -DHAVE_CONFIG_H -I. -I../include -D_GNU_SOURCES -DNDEBUG -march=pentium3 -O3 -ftracer -fforce-addr -pipe -fomit-frame-pointer -fvisibility-inlines-hidden -fPIC -fPIC -c ../c++/cursesm.cc
make[1]: *** [../obj_s/cursesm.o] Error 1
make[1]: *** Waiting for unfinished jobs....
cc1plus: error: unrecognized option `-fvisibility-inlines-hidden'
make[1]: *** [../obj_s/cursesf.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/ncurses-5.4-r5/work/ncurses-5.4/c++'
make: *** [all] Error 2

livecd portage# gcc --version
gcc (GCC) 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)
Back to top
View user's profile Send private message
Deranger
Veteran
Veteran


Joined: 26 Aug 2004
Posts: 1215

PostPosted: Mon Oct 11, 2004 4:16 pm    Post subject: Reply with quote

Solved...

Last edited by Deranger on Wed Nov 17, 2004 11:07 am; edited 2 times in total
Back to top
View user's profile Send private message
Keffin
Apprentice
Apprentice


Joined: 14 Feb 2004
Posts: 202
Location: England

PostPosted: Mon Oct 11, 2004 9:33 pm    Post subject: Reply with quote

I'd just like to say thanks for an awesome guide. It really helps to have all this stuff in one place :D. I've edited my init scripts to save time on booting, and you forced me to go for NPTL/LDFLAGS too ;).
_________________
Always cut the deck if it ups your odds.
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Mon Oct 11, 2004 9:35 pm    Post subject: Reply with quote

If you adopt the use of LDFLAGS in /etc/make.conf, do you still use prelink- or are they incompatible?
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
Back to top
View user's profile Send private message
zerojay
Veteran
Veteran


Joined: 09 Aug 2003
Posts: 1033

PostPosted: Mon Oct 11, 2004 11:12 pm    Post subject: Reply with quote

TheKat wrote:
Quote:
As for the CXXFLAGS, -fvisibility-inlines-hidden has been reported as a good flag to improve the C++ compiles (thx teutzz).

Is there a specific GCC version for those? GCC 3.3.4 dies with -fvisibility-inlines-hidden.
Code:
cd ../obj_s;  /usr/bin/g++ -I../c++ -I../include -I. -DHAVE_CONFIG_H -I. -I../include -D_GNU_SOURCES -DNDEBUG -march=pentium3 -O3 -ftracer -fforce-addr -pipe -fomit-frame-pointer -fvisibility-inlines-hidden -fPIC -fPIC -c ../c++/cursesm.cc
make[1]: *** [../obj_s/cursesm.o] Error 1
make[1]: *** Waiting for unfinished jobs....
cc1plus: error: unrecognized option `-fvisibility-inlines-hidden'
make[1]: *** [../obj_s/cursesf.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/ncurses-5.4-r5/work/ncurses-5.4/c++'
make: *** [all] Error 2

livecd portage# gcc --version
gcc (GCC) 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)


3.4.x
Back to top
View user's profile Send private message
Keffin
Apprentice
Apprentice


Joined: 14 Feb 2004
Posts: 202
Location: England

PostPosted: Mon Oct 11, 2004 11:34 pm    Post subject: Reply with quote

wrc1944 wrote:
If you adopt the use of LDFLAGS in /etc/make.conf, do you still use prelink- or are they incompatible?


Apparently they are compatible, though I have never tried prelinking before or after setting up LDFLAGS.
_________________
Always cut the deck if it ups your odds.
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 3435
Location: Gainesville, Florida

PostPosted: Tue Oct 12, 2004 2:16 pm    Post subject: Reply with quote

Keffin,
Thanks for the input. Seeing as how you have not actually tried this, could you elaborate a little on your basis for thinking they are compatible, or point me to some info (other than the forum threads)?

I recently installed Yoper on one of my boxes, and it has prelink out of the box, and I must say Yoper is very snappy for a precompiled rpm distro. Therefore, I prelinked one of my Gentoo installations to see if made any difference. I have to say I can barely notice any, and maybe I'm imagining any perceived improvement.

Then I read about LDFLAGS, and it seemed like something to try, thus my question about prelink & LDFLAGS. Can anyone confirm that I remove prelink before trying LDFLAGS, or doesn't it really matter?
_________________
Main box- AsRock x370 Gaming K4
Ryzen 7 3700x, 3.6GHz, 16GB GSkill Flare DDR4 3200mhz
Samsung SATA 1000GB, Radeon HD R7 350 2GB DDR5
OpenRC Gentoo ~amd64 plasma, glibc-2.36-r7, gcc-13.2.1_p20230304
kernel-6.8.4 USE=experimental python3_11
Back to top
View user's profile Send private message
Keffin
Apprentice
Apprentice


Joined: 14 Feb 2004
Posts: 202
Location: England

PostPosted: Tue Oct 12, 2004 2:42 pm    Post subject: Reply with quote

wrc1944 wrote:
Keffin,
Thanks for the input. Seeing as how you have not actually tried this, could you elaborate a little on your basis for thinking they are compatible, or point me to some info (other than the forum threads)?

I recently installed Yoper on one of my boxes, and it has prelink out of the box, and I must say Yoper is very snappy for a precompiled rpm distro. Therefore, I prelinked one of my Gentoo installations to see if made any difference. I have to say I can barely notice any, and maybe I'm imagining any perceived improvement.

Then I read about LDFLAGS, and it seemed like something to try, thus my question about prelink & LDFLAGS. Can anyone confirm that I remove prelink before trying LDFLAGS, or doesn't it really matter?


Sorry for the excessively short reply, I was on windows after having the problem with the new tar stopping me booting linux.

I don't know how to link to an exact post in a thread but look at the 9th/10th post down to the end of the page on page 2 of this thread. The conversation about prelinking seems to fizzle out with no word of whether it worked or not, but there's a couple of links to information about it there.
_________________
Always cut the deck if it ups your odds.
Back to top
View user's profile Send private message
cbr
Apprentice
Apprentice


Joined: 05 Jan 2004
Posts: 285
Location: Tallinn/Rakvere, Estonia

PostPosted: Wed Oct 13, 2004 3:09 pm    Post subject: Reply with quote

Keffin wrote:
I don't know how to link to an exact post in a thread....

Quote:
Posted: Tue Oct 12, 2004 4:42 pm Post subject:

Infront of this line there is a little page icon. Press on that and copy the address on the address bar or do Copy Link Location on it ;)
Back to top
View user's profile Send private message
Keffin
Apprentice
Apprentice


Joined: 14 Feb 2004
Posts: 202
Location: England

PostPosted: Wed Oct 13, 2004 4:32 pm    Post subject: Reply with quote

cbr wrote:
Keffin wrote:
I don't know how to link to an exact post in a thread....

Quote:
Posted: Tue Oct 12, 2004 4:42 pm Post subject:

Infront of this line there is a little page icon. Press on that and copy the address on the address bar or do Copy Link Location on it ;)


Ah, that's clever. Thanks.
_________________
Always cut the deck if it ups your odds.
Back to top
View user's profile Send private message
asph
l33t
l33t


Joined: 25 Aug 2003
Posts: 741
Location: Barcelona, Spain

PostPosted: Thu Oct 14, 2004 11:19 am    Post subject: Reply with quote

theres a little discussion about this thread in the developers mailing list, its a good reading to learn why some of the tweaks are dangerous :P

http://thread.gmane.org/gmane.linux.gentoo.devel/22100
_________________
gentoo sex is updatedb; locate; talk; date; cd; strip; look; touch; finger; unzip; uptime; gawk; head; emerge --oneshot condom; mount; fsck; gasp; more; yes; yes; yes; more; umount; emerge -C condom; make clean; sleep
Back to top
View user's profile Send private message
Deranger
Veteran
Veteran


Joined: 26 Aug 2004
Posts: 1215

PostPosted: Thu Oct 14, 2004 1:09 pm    Post subject: Reply with quote

I did all those init-script tweaks (except RC_PARALLER_STARTUP, why? see my posts above)

Running nitro-sources, dramatically speed increase in boot...Especially localmounts, Reiser4 takes more time to mount than other filesystems, and I have 6 x Reiser4 (/ and 5 x storage) partitions...

As far as I understood, localmounts tweak is safe if your fstab entries doesn't have dependencies (in example /usr & /usr/share)

Some guy wrote:

Now, in all seriousness, none of the modifications (save the
RC_PARALLEL_STARTUP setting) are safe:

:lol: "If it ain't b0rked, b0rk it"

Actually, I removed those tweaks and left only localmounts (No, I don't have any entries in fstab that has dependencies to each other...)

And last, but not least: there seems to be some problems with ccache if you haven't set CCACHE_DIR in /etc/make.conf

Read more from here: https://forums.gentoo.org/viewtopic.php?t=236603
Back to top
View user's profile Send private message
teutzz
Guru
Guru


Joined: 22 Apr 2004
Posts: 333
Location: .ro

PostPosted: Fri Oct 15, 2004 8:54 am    Post subject: Reply with quote

Keffin wrote:
wrc1944 wrote:
Keffin,
Thanks for the input. Seeing as how you have not actually tried this, could you elaborate a little on your basis for thinking they are compatible, or point me to some info (other than the forum threads)?

I recently installed Yoper on one of my boxes, and it has prelink out of the box, and I must say Yoper is very snappy for a precompiled rpm distro. Therefore, I prelinked one of my Gentoo installations to see if made any difference. I have to say I can barely notice any, and maybe I'm imagining any perceived improvement.

Then I read about LDFLAGS, and it seemed like something to try, thus my question about prelink & LDFLAGS. Can anyone confirm that I remove prelink before trying LDFLAGS, or doesn't it really matter?


Sorry for the excessively short reply, I was on windows after having the problem with the new tar stopping me booting linux.

I don't know how to link to an exact post in a thread but look at the 9th/10th post down to the end of the page on page 2 of this thread. The conversation about prelinking seems to fizzle out with no word of whether it worked or not, but there's a couple of links to information about it there.

well i have 99% of my system build with ldflags (including kde) (that 1% that's missing includes openoffice and so on) and it's all prelinked and no problems what so ever :D
_________________
Cand nu stii ce sa raspunzi sau ce sa spui un simplu BLA ajunge... lolz
Back to top
View user's profile Send private message
Keffin
Apprentice
Apprentice


Joined: 14 Feb 2004
Posts: 202
Location: England

PostPosted: Fri Oct 15, 2004 3:05 pm    Post subject: Reply with quote

Anyone having problems with loading modules in >=gentoo-dev-sources-2.6.8-r8 will have to lose the changes to the init scripts. I can't be bothered finding out which one did it at the moment, but I might when I get time.
_________________
Always cut the deck if it ups your odds.
Back to top
View user's profile Send private message
Hackeron
Guru
Guru


Joined: 01 Nov 2002
Posts: 307

PostPosted: Fri Oct 15, 2004 5:39 pm    Post subject: Reply with quote

Ran a short test to see if psyco makes a noticeable improvement. Notice that psyco now imports fine. So "except: pass" is no longer needed.

Code:

portage-2.0.50-r11  emerge -ep world
1ghz via c3-2 nehemiah 512Mb PC2700
-----------------------------------

psyco.full()
        0m41.919s 0m36.447s 0m5.002s
        0m42.046s 0m36.539s 0m5.006s
        0m42.089s 0m36.430s 0m5.154s

psyco.log(); psyco.full()
        0m42.098s 0m36.559s 0m5.010s
        0m42.101s 0m36.508s 0m5.040s
        0m42.230s 0m36.374s 0m5.319s

psyco.full(); except pass
        0m42.127s 0m36.569s 0m5.028s
        0m42.440s 0m36.388s 0m5.275s
        0m42.265s 0m36.423s 0m5.188s

psyco.profile()
        0m49.296s 0m42.820s 0m5.844s
        0m49.037s 0m42.642s 0m5.756s
        0m49.179s 0m42.839s 0m5.741s

psyco.log(); psyco.profile()
        0m49.450s 0m43.109s 0m5.746s
        0m49.417s 0m42.917s 0m5.865s
        0m49.575s 0m43.173s 0m5.804s

nothing;
        0m49.623s 0m44.142s 0m4.856s
        0m49.543s 0m44.050s 0m4.933s
        0m49.648s 0m44.121s 0m4.910s

psyco.log(); psyco.profile(0.2)
        0m54.920s 0m48.323s 0m5.889s
        0m55.047s 0m48.585s 0m5.767s
        0m56.631s 0m48.424s 0m6.463s


Verdict? -- not quite 100x improvement as possible, not even the 4x as promised.. not even 2x as minimum listed! -- doesnt seem worth the risk of things breaking.
Back to top
View user's profile Send private message
twiggy
n00b
n00b


Joined: 25 Nov 2003
Posts: 65
Location: Sweden

PostPosted: Mon Oct 18, 2004 7:02 pm    Post subject: Reply with quote

http://217.209.205.126/goawaybaselayout.html

I hope this could be of any use for some of you :)
_________________
Bite my shiny metal ass!
Back to top
View user's profile Send private message
Hackeron
Guru
Guru


Joined: 01 Nov 2002
Posts: 307

PostPosted: Mon Oct 18, 2004 7:07 pm    Post subject: Reply with quote

twiggy wrote:
http://217.209.205.126/goawaybaselayout.html

I hope this could be of any use for some of you :)


How does this speed anything up exactly?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 2 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum