# Optimization

## BiynaYahu

Fellow Linux Enthusiasts,

    I managed to get Gentoo installed on my own (basically), praise Yah!  But, I would now like to optimize my kernel and programs for my hardware.  Plus the uses I intend for my computer.  So, if anyone would be so kind as to lend me their expertise, just ask me for any system info you need.

Everyone's Brother,

Mike Browell

----------

## Maliwik

Well, to start, what's the output of emerge --info?

----------

## poly_poly-man

 *BiynaYahu wrote:*   

> Fellow Linux Enthusiasts,
> 
>     I managed to get Gentoo installed on my own (basically), praise Yah!  But, I would now like to optimize my kernel and programs for my hardware.  Plus the uses I intend for my computer.  So, if anyone would be so kind as to lend me their expertise, just ask me for any system info you need.
> 
> Everyone's Brother,
> ...

 

First step: optimize the kernel. Basically, set the processor type right, and follow some guide online for other options.

Second: make sure you set -march correct - look up CFLAGS in the gentoo wiki.

3: USE flags. read through /usr/portage/profiles/use.desc, and decide on each one (add to your USE="" line in /etc/make.conf.

1 should give some optimization (unless you screwed something up), 2 should give a little more, and 3 will be the biggest - affecting what gets compiled into each program.

poly-p man

----------

## BiynaYahu

Peace Everyone,

```
localhost biynayahu # emerge --info

--- Invalid atom in /etc/portage/package.keywords: dev-libs/libnl-1.0_pre6

--- Invalid atom in /etc/portage/package.keywords: =net-misc/networkmanager

--- Invalid atom in /etc/portage/package.unmask: =net-misc/networkmanager

--- Invalid atom in /etc/portage/package.unmask: =net-misc/networkmanager

Portage 2.1.2.2 (default-linux/amd64/2007.0/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.19-gentoo-r5 x86_64)

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

System uname: 2.6.19-gentoo-r5 x86_64 AMD Athlon(tm) 64 X2 Dual-Core Processor TK-55

Gentoo Base System release 1.12.9

Timestamp of tree: Thu, 08 Mar 2007 00:30:01 +0000

dev-lang/python:     2.4.3-r4

dev-python/pycrypto: 2.0.1-r5

sys-apps/sandbox:    1.2.17

sys-devel/autoconf:  2.61

sys-devel/automake:  1.9.6-r2, 1.10

sys-devel/binutils:  2.16.1-r3

sys-devel/gcc-config: 1.3.14

sys-devel/libtool:   1.5.22

virtual/os-headers:  2.6.17-r2

ACCEPT_KEYWORDS="amd64"

AUTOCLEAN="yes"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"

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

CXXFLAGS="-O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"

GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

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

USE="X acl acpi alsa amd64 arts berkdb bitmap-fonts cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kde kerberos ldap libg++ mad midi mikmod mmx mp3 mpeg ncurses nls nptl nptlonly ogg opengl oss pam pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode vorbis xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark ati chips cirrus cyrix dummy fbdev glint i128 i810 mga neomagic nv rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"

Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
```

The output of emerge --info.  Also, I've been having trouble getting my wifi up with wpa_supplicant.

----------

## d2_racing

First, can you post that plz :

```

# cat /etc/portage/package.keywords

# cat /etc/portage/package.unmask

```

You have something wrong inside theses files.

----------

## d2_racing

Your CFLAGS needs to be optimised also.

----------

## d2_racing

Can you post your lspci and also theses 2 files plz:

```

# cat /etc/conf.d/net

# cat /etc/wpa/wpa_supplicant.conf

```

----------

## BiynaYahu

```
biynayahu@localhost ~ $ cat /etc/portage/package.keywords

net-wireless/bcm43xx-fwcutter ~amd64

net-wireless/ndiswrapper ~amd64

net-misc/networkmanager ~am64 ~amd64 ~AMD64 ~package.mask package.mask

=net-misc/networkmanager

=net-misc/networkmanager-0.6.4_pre20061028

dev-libs/libnl-1.0_pre6 package.mask ~amd64

dev-libs/libnl ~amd64

>=dev-libs/libnl-1.0_pre6

net-misc/dhcdbd ~amd64

=net-misc/dhcdbd-1.14-r1

```

```
biynayahu@localhost ~ $ cat /etc/portage/package.unmask  

=net-misc/networkmanager

=net-misc/networkmanager

=net-misc/networkmanager-0.6.4_pre20061028

>=dev-libs/libnl-1.0_pre6

=net-misc/dhcdbd-1.14-r1

```

----------

## BiynaYahu

```
localhost biynayahu # lspci

00:00.0 Host bridge: ATI Technologies Inc RS480 Host Bridge (rev 10)

00:01.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge

00:05.0 PCI bridge: ATI Technologies Inc Unknown device 5a37

00:06.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge

00:12.0 IDE interface: ATI Technologies Inc SB600 Non-Raid-5 SATA

00:13.0 USB Controller: ATI Technologies Inc SB600 USB (OHCI0)

00:13.1 USB Controller: ATI Technologies Inc SB600 USB (OHCI1)

00:13.2 USB Controller: ATI Technologies Inc SB600 USB (OHCI2)

00:13.3 USB Controller: ATI Technologies Inc SB600 USB (OHCI3)

00:13.4 USB Controller: ATI Technologies Inc SB600 USB (OHCI4)

00:13.5 USB Controller: ATI Technologies Inc SB600 USB Controller (EHCI)

00:14.0 SMBus: ATI Technologies Inc SB600 SMBus (rev 14)

00:14.1 IDE interface: ATI Technologies Inc SB600 IDE

00:14.2 Audio device: ATI Technologies Inc SB600 Azalia

00:14.3 ISA bridge: ATI Technologies Inc SB600 PCI to LPC Bridge

00:14.4 PCI bridge: ATI Technologies Inc SB600 PCI to PCI Bridge

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

01:05.0 VGA compatible controller: ATI Technologies Inc RS482 [Radeon Xpress 200M]

05:00.0 Network controller: Broadcom Corporation Unknown device 4311 (rev 01)

08:00.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02)

08:01.0 Class 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 19)

08:01.1 System peripheral: Ricoh Co Ltd Unknown device 0843 (rev 01)

```

```
localhost biynayahu # cat /etc/conf.d/net

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

modules=("wpa_supplicant")

wpa_supplicant_wlan0="-Dwext"

wpa_timeout_wlan0=60

```

```
localhost biynayahu # cat /etc/wpa_supplicant/wpa_supplicant.conf

network={

        ssid="101Pine"

        psk="*****"

        key_mgmt=WPA-PSK

        proto=WPA

        pairwise=TKIP

}

# This is a network block that connects to any unsecured access point.

# We give it a low priority so any defined blocks are preferred.

network={

        key_mgmt=NONE

        priority=-9999999

}

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=users

update_config=1

```

Last edited by BiynaYahu on Sun May 11, 2008 6:03 pm; edited 1 time in total

----------

## bunder

Moved from Installing Gentoo to Kernel & Hardware.

----------

