# Core Duo processor working too slow

## Zmyrgel

Just finished installing Gentoo on my Acer Travelmate 4202WLMI and everything seem to work pretty well exept my processor appaerantly isn't working as fast as it should. 

I checked with this site: http://gaston.gmxhome.de/linux/acer_travelmate_4202.html and compiled and run the code in there and I too get the 24 sec time on it  :Sad: 

Is there anyway to get full benefits from my processor? I have enabled SMP and tried disabling CPU frequence scaling but that didn't have any effect. 

Any idea what else to try? Would be nice to be able to compile code that +40% faster.

Also, not sure if related, I can't get the CPUfreq to work. If I try the cpufreq-info it just states "no or unknown CPUfreq driver working on the computer".

----------

## BlueFusion

Can we see the output of emerge --info?

Simply compiling that script with no special flags does not really mean much.  Using your specific, optimized CFLAGS is what counts.

----------

## Zmyrgel

```
Portage 2.0.54-r2 (default-linux/x86/2006.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.16-gentoo-r7 i686)

=================================================================

System uname: 2.6.16-gentoo-r7 i686 Genuine Intel(R) CPU           T2300  @ 1.66GHz

Gentoo Base System version 1.6.14

dev-lang/python:     2.4.2

dev-python/pycrypto: [Not Present]

dev-util/ccache:     [Not Present]

dev-util/confcache:  [Not Present]

sys-apps/sandbox:    1.2.17

sys-devel/autoconf:  2.13, 2.59-r7

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1

sys-devel/binutils:  2.16.1

sys-devel/libtool:   1.5.22

virtual/os-headers:  2.6.11-r2

ACCEPT_KEYWORDS="x86"

AUTOCLEAN="yes"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-march=pentium-m -O2 -pipe -msse3 -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"

CXXFLAGS="-march=pentium-m -O2 -pipe -msse3 -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoconfig distlocks sandbox sfperms strict"

GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"

LC_ALL="fi_FI.UTF-8"

LINGUAS="fi en"

MAKEOPTS="-j4"

PKGDIR="/usr/portage/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="x86 16bit X a52 aac acpi adsl allegro alsa amarok apache2 apm async audiofile automount avi bash-completion berkdb bitmap-fonts bittorrent bmpx bzip2 c++ cardbus ccache cdinstall cdio cdparanoia cdr cdrom clamav clamd cli cpudetection crypt dbus dhcp dri dts dvbplayer dvd dvdr dvdread dxr3 eds emboss encode esd exif expat fam fat fbsplash ffmpeg finger firefox flac foomaticdb ftp gdbm gif gkrellm glut gmp gpm gstreamer gtk gtk2 hal hddtemp icc idn ieee1394 imlib innodb ipv6 irc irssi java javascript jpeg kde lcms libg++ libwww linuxthreads-tls lm_sensors logitech-mouse mad matroska mikmod mmx mng motif mp3 mp4 mpeg mplayer msql mysql mysqlfriends mysqli nat ncurses nethack nls nptl nptlonly nsplugin nvidia ogg opengl openssh openssl opera pam pam-mysql pci pcmcia pcre pdflib perl php pmu png pnp pop pop3d postgres ppds pppd python qt quicktime readline reflection reiserfs samba sasl screen sdl sendmail session smp spamassassin spell spl sql sse sse2 ssl swat symlink tcpd threads tiff truetype truetype-fonts type1-fonts udev unicode unzip usb userlocales vfat vim vim-pager vim-with-x virus-scan vorbis wifi win32codecs wma wordperfect xine xinerama xml xml2 xmms xorg xv zlib linguas_fi linguas_en userland_GNU kernel_linux elibc_glibc"

Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS
```

----------

## cbradney

You might want march=prescott. Thats what I have on my triple boot Core Duo imac.

----------

## eno_on

 *cbradney wrote:*   

> You might want march=prescott. Thats what I have on my triple boot Core Duo imac.

 

I would set the architechture as pentium-m, not prescott, as the core duo is pretty much a dual core pentium m (it inherited features from the p3, not p4)

You should consider rebuilding your system as many optimizations for prescott do not translate to pentium m/core (prescott has an extremely deep pipeline, has hyperthreading, etc)

----------

## cbradney

https://forums.gentoo.org/viewtopic-t-448761-highlight-prescott.html

http://gentoo-wiki.com/Safe_Cflags#Intel_Core_Solo.2FDuo_.28Yonah.29

both say prescott.

----------

## chunderbunny

It seems like an optimisation problem, I ran the sample code with the following results 

```
jasper@TurboGrafx16 ~ $ time ./a.out

n=2305843005992468481

real    0m13.424s

user    0m13.170s

sys     0m0.000s
```

And from my /etc/make.conf 

```
CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CXXFLAGS="${CFLAGS}"

MAKEOPTS="-j3"

```

Edit: Forgot to mention, this is on a 1.66GHz Core duo Mac Mini with 1GB or RAM,

----------

## eno_on

 *cbradney wrote:*   

> https://forums.gentoo.org/viewtopic-t-448761-highlight-prescott.html
> 
> http://gentoo-wiki.com/Safe_Cflags#Intel_Core_Solo.2FDuo_.28Yonah.29
> 
> both say prescott.

 

Seriously if you look at the architechture a core is an evolution of the pentium m (shares almost nothing aside from sse and the manufacturing process from the p4)

By doing prescott cflags you're optimizing for the ~30 stage pipeline of a late-model p4, when the core duo has under half as many pipeline stages.

I would do -march=pentium-m -msse3

----------

