Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Help for /etc/make.conf
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
lapuita
n00b
n00b


Joined: 08 Aug 2008
Posts: 47
Location: Belgium

PostPosted: Tue Feb 24, 2009 7:20 pm    Post subject: Help for /etc/make.conf Reply with quote

Hi,

I have a CPU:
Quote:
Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz

I installed gentoo but it is slower than the other distributions tested. I think that I have a problem in this file:
Quote:
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /etc/make.conf.example for a more detailed example.
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer -fno-ident -fweb -msse3"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"
MAKEOPTS="-j3"
VIDEO_CARDS="nvidia vesa"
ALSA_CARDS="hda-intel" INPUT_DEVICES="keyboard mouse evdev synaptics"
# These are the USE flags that were used in addition to what is provided by the
# profile used for building.
USE="fam acpi alsa bash-completion branding cairo cdr css cups dbus dvd dvdr dvdread dri dv eds emboss emacs encode esd evo firefox gif gnome gpm gstreamer gtk gtk2 hal jpeg -kde kerberos latex ldap libnotify lm_sensors matroska mad mikmod mp3 mpeg mplayer multilib ogg opengl pdf png ppds pcmcia -qt3 -qt3support -qt4 real quicktime sdl svg smartcard spell tiff truetype vorbis win32codecs wifi unicode usb X xml xv xvid xvmc mmx sse sse2"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ "
FEATURES="ccache"
CCACHE_SIZE="2G"
LINGUAS="fr"



I do not know linux too. What should I change?

Thanks
Back to top
View user's profile Send private message
mgrela
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2008
Posts: 123
Location: Polska

PostPosted: Tue Feb 24, 2009 7:43 pm    Post subject: Reply with quote

What do you mean by "it's slower" ? Have you done some benchmarks ? Please be more specific.
_________________
Maciej Grela
You just keep on trying till you run out of cake.
Back to top
View user's profile Send private message
Gankfest
l33t
l33t


Joined: 01 Aug 2007
Posts: 946
Location: Miami Beach, FL

PostPosted: Tue Feb 24, 2009 7:45 pm    Post subject: Reply with quote

about chost:

http://www.gentoo.org/doc/en/change-chost.xml

bottom of the page here:

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=5#doc_chap4
_________________
Gankfest™ (>")> ~*

Everyone has to start somewhere, it depends on where you end up that counts! (>")>
Back to top
View user's profile Send private message
jfp
Guru
Guru


Joined: 08 Jul 2007
Posts: 326
Location: Virginia, USA

PostPosted: Tue Feb 24, 2009 7:56 pm    Post subject: Reply with quote

Just run:
Code:
emerge --info

_________________
jfp
Back to top
View user's profile Send private message
jfp
Guru
Guru


Joined: 08 Jul 2007
Posts: 326
Location: Virginia, USA

PostPosted: Tue Feb 24, 2009 7:57 pm    Post subject: Reply with quote

Ooops - I replied to the wrong post - sorry
_________________
jfp
Back to top
View user's profile Send private message
lapuita
n00b
n00b


Joined: 08 Aug 2008
Posts: 47
Location: Belgium

PostPosted: Tue Feb 24, 2009 8:01 pm    Post subject: Reply with quote

mgrela wrote:
What do you mean by "it's slower" ? Have you done some benchmarks ? Please be more specific.


the boot, the navigation, etc..

maybe the cflags are not corrects.
Back to top
View user's profile Send private message
lapuita
n00b
n00b


Joined: 08 Aug 2008
Posts: 47
Location: Belgium

PostPosted: Tue Feb 24, 2009 8:25 pm    Post subject: Reply with quote

firefox for example takes 15s
Quote:
emerge --info
Portage 2.1.4.4 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.25-gentoo-r7 x86_64 Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz
Timestamp of tree: Mon, 01 Sep 2008 09:45:01 +0000
app-shells/bash: 3.2_p33
dev-lang/python: 2.5.2-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox: 1.2.18.1-r2
sys-devel/autoconf: 2.13, 2.61-r2
sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils: 2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool: 1.5.26
virtual/os-headers: 2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer -fno-ident -fweb -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer -fno-ident -fweb -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ "
LDFLAGS="-Wl,-O1"
LINGUAS="fr"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt css cups dbus dri dv dvd dvdr dvdread eds emacs emboss encode esd evo fam firefox fortran gdbm gif gnome gpm gstreamer gtk gtk2 hal iconv ipv6 isdnlog jpeg kerberos latex ldap libnotify lm_sensors mad matroska midi mikmod mmx mp3 mpeg mplayer mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pcmcia pcre pdf perl png ppds pppd python quicktime readline reflection sdl session smartcard spell spl sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis wifi xml xorg xv xvid xvmc zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


Now reiserfsck failed on /home (manually)
Back to top
View user's profile Send private message
mgrela
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2008
Posts: 123
Location: Polska

PostPosted: Tue Feb 24, 2009 8:33 pm    Post subject: Reply with quote

Does every application start slow or just firefox ? Do both console apps (ie. mc) and X11 apps (ie. firefox) start slow ? Do the applications just start slow and then work normally or do they perform sluggishly all the time ? Do any processes eat up your CPU (check that using top) ?

Edit:

As for the CFLAGS maybe you're a bit too aggressive - see the safe CFLAGS here http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel#Intel_Core_2_Duo.2FQuad_.2F_Xeon_51xx.2F53xx.2F54xx.2C_Pentium_Dual-Core_T23xx.2B.2FExxxx
_________________
Maciej Grela
You just keep on trying till you run out of cake.
Back to top
View user's profile Send private message
lapuita
n00b
n00b


Joined: 08 Aug 2008
Posts: 47
Location: Belgium

PostPosted: Tue Feb 24, 2009 8:37 pm    Post subject: Reply with quote

Yes all applications, even in console. Yes just start slow and work normally.
With top, nothing strange with CPU and Mem
Back to top
View user's profile Send private message
lapuita
n00b
n00b


Joined: 08 Aug 2008
Posts: 47
Location: Belgium

PostPosted: Tue Feb 24, 2009 9:06 pm    Post subject: Reply with quote

I'm going to reinstall gentoo with proper cflags, etc ... how you change the make.conf?
Quote:

CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CXXFLAGS="${CFLAGS}"


and for use??
Back to top
View user's profile Send private message
lapuita
n00b
n00b


Joined: 08 Aug 2008
Posts: 47
Location: Belgium

PostPosted: Tue Feb 24, 2009 9:32 pm    Post subject: Re: Help for /etc/make.conf Reply with quote

What do you say about
Quote:
# Please consult /etc/make.conf.example for a more detailed example.
CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer -fno-ident -mssse3"
CXXFLAGS="${CFLAGS}"
Back to top
View user's profile Send private message
mgrela
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jul 2008
Posts: 123
Location: Polska

PostPosted: Tue Feb 24, 2009 10:17 pm    Post subject: Reply with quote

lapuita wrote:
Yes all applications, even in console. Yes just start slow and work normally.
With top, nothing strange with CPU and Mem


Use strace to launch some app. Try to notice, which syscalls are taking the most time. They should provide you with some hints as to what is happening. If you don't know how to analyze the trace by yourself post it to pastebin and put a link here.
_________________
Maciej Grela
You just keep on trying till you run out of cake.
Back to top
View user's profile Send private message
Frustie
Tux's lil' helper
Tux's lil' helper


Joined: 31 Aug 2007
Posts: 102
Location: My own little planet.

PostPosted: Wed Feb 25, 2009 9:06 am    Post subject: Reply with quote

please also do a memtest
Back to top
View user's profile Send private message
jorgepeixoto
Apprentice
Apprentice


Joined: 27 Apr 2006
Posts: 218
Location: São José dos Campos, São Paulo, Brasil

PostPosted: Sun Mar 08, 2009 12:50 am    Post subject: Reply with quote

lapuita wrote:
firefox for example takes 15s
Quote:
emerge --info
Portage 2.1.4.4 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.25-gentoo-r7 x86_64 Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz
Timestamp of tree: Mon, 01 Sep 2008 09:45:01 +0000
app-shells/bash: 3.2_p33
dev-lang/python: 2.5.2-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox: 1.2.18.1-r2
sys-devel/autoconf: 2.13, 2.61-r2
sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils: 2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool: 1.5.26
virtual/os-headers: 2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer -fno-ident -fweb -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer -fno-ident -fweb -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ "
LDFLAGS="-Wl,-O1"
LINGUAS="fr"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt css cups dbus dri dv dvd dvdr dvdread eds emacs emboss encode esd evo fam firefox fortran gdbm gif gnome gpm gstreamer gtk gtk2 hal iconv ipv6 isdnlog jpeg kerberos latex ldap libnotify lm_sensors mad matroska midi mikmod mmx mp3 mpeg mplayer mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pcmcia pcre pdf perl png ppds pppd python quicktime readline reflection sdl session smartcard spell spl sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis wifi xml xorg xv xvid xvmc zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr" USERLAND="GNU" VIDEO_CARDS="nvidia vesa"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


Now reiserfsck failed on /home (manually)


How exactly did reiserfsck failed on /home?

Also, post your /etc/fstab

Also, the output of the command df

How is your hard disk partitioned?

Also, switch to runlevel 1 (with telinit 1) and issue the command hdparm -tT /dev/YOURHARDDRIVEDEVICE

Do applications start slow every time or just for the first time they are launched?
For example, in my system, Firefox takes 9s to start immediately after login; on subsequent starts, it takes 2.1s (most likely this speedup is due to the disk cache).

For comparison, here are some specs about my system:

Athlon XP 2600+ (cpu family 6, model 8, 2166MHz, 256 KB L2 cache, 128KB L1 cache, 133MHz FSB) with 1 GiB of DDR RAM at 266MHz (some 140MiB of which are inaccessible due to kernel configuration); the HD is 80GB (cfdisk reports 80060424192 bytes), and hdparm -tT run 6 times at runlevel 1 results in (output edited to show average and error margin):

Timing cached reads: 610 +- 34 MB in 2 seconds = 300 +- 13 MB/s
Timing buffered disk reads: 160 MB in 3.02 seconds = 53 +- 0.02 MB/s

The filesystem is reiserfs, at least 3 years old, probably fragmented (specially because its usage was 98%+ in the past, and actually filled at least twice). Nowadays its usage is 7% and it is mounted with relatime, notail

Software:
Stable Gentoo system
gcc-4.1.2, glibc-2.6.1-r0, linux 2.6.27.19
mozilla-firefox-3.0.6, xulrunner-1.9.0.6, LXDE, xdm-1.1.6, gkrellm-2.3.2 (which was running when the test was performed, as it starts at login)
CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"

Immediately after login, opening an rxvt and issuing free reports that 20MB of RAM is used (plus 39MB of buffers/cache).
Back to top
View user's profile Send private message
jorgepeixoto
Apprentice
Apprentice


Joined: 27 Apr 2006
Posts: 218
Location: São José dos Campos, São Paulo, Brasil

PostPosted: Sun Mar 08, 2009 1:02 am    Post subject: Re: Help for /etc/make.conf Reply with quote

lapuita wrote:
What do you say about
Quote:
# Please consult /etc/make.conf.example for a more detailed example.
CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer -fno-ident -mssse3"
CXXFLAGS="${CFLAGS}"


The page at http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel#Intel_Core_2_Duo.2FQuad_.2F_Xeon_51xx.2F53xx.2F54xx.2C_Pentium_Dual-Core_T23xx.2B.2FExxxx

says that "If you are using GCC 4.3 or higher, you can use the -march=core2 flag with your Intel Core2 Processor". You *do not* have "GCC 4.3 or higher". From your emerge --info, I see you have GCC-4.1.2 (just like me).

I would probably stick with the suggested CFLAGS="-march=nocona -O2 -pipe"

One important advice for you that are beginning with Gentoo: don't waste your time messing with CFLAGS. The speed gains are very very small, and you risk losing stability. What really makes a difference is

-march=YOUR_ARCH

The -march flag enables GCC to generated optimized code for your processor

-O2

The -O2 flag enables the most commonly used optimization level. You might experiment with -O3, but, despite its name (which suggests it is superior, or at least more aggressive, than -O2) -O3 is not necessarily faster than -O2. In fact, it can generate slower programs. The speed gains, if any, are likely to be small. I don't recommend you wasting your time experimenting -O3.

-fomit-frame-pointer

The -fomit-frame-pointer flag, on certain processors, can make the code some 5% faster, at the cost of making debugging more difficult. I have enabled it in my computer. For some processors, (and I believe amd64 processors are included here) this flag is not necessary.

Any other flag (like -fweb) will produce very small speedups (if any). If you value your time, don't waste it messing with CFLAGS (I have wasted mine, and am regretted).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
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