# Kernel/System Performance Suggestions for Core i7 Laptop

## jasn

I'm trying to optimize my new Clevo D900F, Core i7, laptop for Linux (only), and while it seems a bit faster than my previous Asus laptop, I'm not sure I've done everything I can to optimize the system. This is a funtoo, KDE 4.3, ~amd64 system, and when I did the initial install, there was a significant amount of system lag when doing multiple things, like emerging packages and web browsing. I tweaked some settings in the kernel, such as timer setting and the kernel latency settings, and things improved noticeably. I'm now just looking for suggestions on any other improvements I can make with either the kernel config, or any other system settings.

uname -a

```
Linux hostname 2.6.31-gentoo #3 SMP PREEMPT Sat Sep 26 17:05:41 EDT 2009 x86_64 Intel(R) Core(TM) i7 CPU 975 @ 3.33GHz GenuineIntel GNU/Linux
```

Here are the pastebin links to some of the other relevant system information;

emerge --info

/etc/fstab

xfs_info of root volume

cat /proc/cpuinfo

lspci

lspci -n

lsusb

/etc/make.conf

kernel config

Thanks for any suggestions and if you require any additional info, just let me know..

----------

## pappy_mcfae

Sure. Use the .config I just whipped up, and be amazed at the speed.

Click here for your new .config. Compile as is.

For the best results, please do the following:

1) Move your .config file out of your kernel source directory (/usr/src/linux-2.6.31-gentoo).

2) Issue the command make mrproper. This is a destructive step. It returns the source to pristine condition. Unmoved .config files will be deleted!

3) Copy my .config into your source directory.

4) Issue the command make && make modules_install.

5) Install the kernel as you normally would, and reboot.

6) Once it boots, please post /var/log/dmesg so I can see how things loaded.

7) Don't forget to set the /usr/src/linux link before you emerge -av nvidia-drivers. eselect kernel set linux-2.6.31-gentoo.

Blessed be!

Pappy

----------

## jasn

Thanks Pappy,

Your help is a boon to users like me. I took your nicely trimmed down kernel config and tweaked it a bit to get it to boot my system. I needed to take out the rootfs on NFS option, and then because of my config, (LVM2 on a RAID5 array, with the root volume on the RAID5 array), I needed to add back, RAID, initrd, and ramdisk support to get it to boot correctly. BTW, because of my system config, I use genkernel to build my kernel, modules, and initramfs file. In general I really like using genkernel because it makes building the kernel a snap, but I found that I needed to first tweak the /etc/genkernel.conf file, to not do an make oldconfig, clean, and mrproper first, in order to save the config information from the kernel directory, before the build process.

I then added a couple of other things that I expect to use sometime in the future, like my webcam driver, and bluetooth. After getting my system booted up, under the final kernel config, it does feel more responsive. However, I wonder is some of my issue is related to performance lag issues in KDE 4.3 in general. I've seen some posts on the forums here that seem to suggest that may be the case. Finally the one performance tweak I did change from your config was to set my timer setting from 1000hz to 300hz. It does seem like it helps my system responsiveness, but it may be only a feeling on my part. Here's the pastbin links to my;

final kernel config

dmesg output

If anyone else has other tweaking advice, I'm all ears.

Thanks again.

----------

## pappy_mcfae

The only further suggestion I'd make would be to turn all the DMA engine support options to modules, and see if the "errors" go away. If not, and the system seems to run as one would expect a computer with eight processors to run (as in really fast), then those are ignorable errors. 

Otherwise, things look pretty good.

Blessed be!

Pappy

----------

## DaggyStyle

what are the heat temps upon compilation?

----------

## jasn

 *pappy_mcfae wrote:*   

> The only further suggestion I'd make would be to turn all the DMA engine support options to modules, and see if the "errors" go away.

 

Pappy,

I recompiled with the Intel IOATDMA as a module which didn't automatically load on bootup. As a result my new dmesg output was free of all of those previous errors. When I loaded the module, all of those same errors were again generated. So since it's now a module, and since it doesn't seem like I need it, I'm going to run like this without loading it in /etc/conf.d/modules and see how things work.

Thanks again,

Jason

----------

## jasn

 *DaggyStyle wrote:*   

> what are the heat temps upon compilation?

 

(sorry for the delay in responding. I'm running KDE 4.3, and I wasted a lot of time figuring out that I should just emerge, and then load and run just lm_sensors and gkrellm to see the system temps.. oh well.. )

The following are degrees centigrade temperatures;

System Idle

--------------

CPU - 54

GPU - 46

Thermal Zone - 53

/dev/sda - 50

/dev/sdb - 51

/dev/sdc - 35

emerge gcc

--------------

CPU - 82

GPU - 47

Thermal Zone - 82

/dev/sda - 52

/dev/sdb - 52

/dev/sdc - 36

It took 11 minutes and 4 seconds to reemerge gcc, and the above measurements were the peak temp reached during the compile, measured from gkrellm and lm_sensors. The CPU/Thermal Zone temps were in the lower 70s range for most of the compile, with one spike to the 82 shown. The 3 HDDs in this laptop are all Seagate Momentus ST9500420AS drives. The reason for the higher temps for sda and sdb is because they're stacked in the laptop case on top of each other with sdc installed in its own bay. I've also had problems with one of the stacked drives, and lots of people have complained about this drive model in general. (I'm almost at the point to seriously examine getting SSDs for this machine so that the I/O will match the CPU, and so that the temps generated can be lower.)

----------

## pappy_mcfae

Eleven minutes? I want to watch that show! Oh yeah!

Blessed be!

Pappy

----------

## DaggyStyle

 *jasn wrote:*   

>  *DaggyStyle wrote:*   what are the heat temps upon compilation? 
> 
> (sorry for the delay in responding. I'm running KDE 4.3, and I wasted a lot of time figuring out that I should just emerge, and then load and run just lm_sensors and gkrellm to see the system temps.. oh well.. )
> 
> The following are degrees centigrade temperatures;
> ...

 

dude, 82 is too much...

----------

## jasn

 *DaggyStyle wrote:*   

> dude, 82 is too much...

 

Absolutely. However, as I said, it only hit that temp for about a single tick, and then it never went that high again. Most of the compile time the CPU was hovering at about 72, (which is still hot). It is a desktop i7 975 CPU, which is a 130w, so it's bound to generate some heat. Still I may look into some additional cooling for the laptop, like a usb cooler, installing SSDs instead of regular HDDs, etc.

Pappy, I guess I should admit I cheated a bit on the emerge setup with this system. I use a lot of the Gentoo tips on the forums here and the wikis which would enable faster compiling on any platforms. Like 8G ccache, and a 2G ramdisk for /var/tmp/portage.

Thanks again.

----------

## pappy_mcfae

With a machine like you have, don't waste time, effort, or hard drive space on ccache. Effectively, all ccache does is store object code in a raw, unlinked form. Effectively, it's all the software you use in stored in chunks. 

All that extra object code is supposed to save your compiler from recompiling. That's not always the way things happen. In actual practice, you wind up with wasted space, and no real time savings. This is especially true when new versions, or version bumps come along. A new version or a version bump means another package's object code is going to sit on your computer, wasting space.

Don't worry about me. I've been using cheats for quite some time. We all do it. 

Also, Laptops run hot. 82 is high, but I've seen higher temps on working computers. The chip on this machine makes it to 150 Fahrenheit regularly, usually when I'm compiling, and the room is hot. It usually hovers in the 120 degree range. Considering you have a lot more cores in approximately the same amount of physical space, you are going to have more heat. It's simple thermodynamics.

Blessed be!

Pappy

----------

## jasn

I actually went back and forth on the usefulness of ccache for me, first installing it, then removing it, only to reinstall it again. I was thinking of the issue that you raised, and whether or not it would really be a benefit with my system config. I'm glad you confirmed this for me, and I've actually have now removed it for good. (The /var/tmp/portage ramdisk was the biggest time saver anyway..)

I also took this opportunity to take the laptop apart, clean the manufacturer applied thermal paste from both CPU and GPU, and then reapply some Arctic Silver. As others have discovered, it doesn't really change the temps much, (although it seems like the GPU now operates at 1 degree cooler), but I thought I would do it to guarantee the thermal paste was applied correctly. I've also got a laptop cooler on order, and since this is largely a desktop replacement, I can use the cooler as my desktop laptop stand, and leave it there for the most part.

The biggest thing for me was the fact that this was my first desktop system that is exclusively Gentoo (no Windows), and I wanted to make sure I got it tuned up correctly. On that front, you were a big help..

----------

## pappy_mcfae

I'm glad I could offer my assistance.

Blessed be!

Pappy

----------

