Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
System slow while compiling
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
kirikou
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2006
Posts: 83

PostPosted: Fri Nov 02, 2007 11:14 pm    Post subject: System slow while compiling Reply with quote

Hello!
I have a problem with my system, each time I upgrade it or compile a new package, my system becomes to be unrespondant... (it took minutes to open epiphany, when I want to switch desktop, it tooks some seconds in order to redraw the desktop, ...)
I think it must be an error in my kernel configuration, but I was not able to find it....
Another error, that might be related, is that when I mount my external hard drive (160GB, whichi is almost full), it tooks minutes in order to be able to read it's content through nautilus (each time I wonder if nautilus has crashed or not).
Do you have any suggestion ?
Thanks!
(I can post any file which might be needed, but I didn't know if it was useful to post my full .config...)
Back to top
View user's profile Send private message
poly_poly-man
Advocate
Advocate


Joined: 06 Dec 2006
Posts: 2477
Location: RIT, NY, US

PostPosted: Fri Nov 02, 2007 11:27 pm    Post subject: Reply with quote

That's what compiling does... it's pretty cpu-intensive.

You _might_ find (experiment - YMMV) that there's a little speed lost in heat. I find occasionally that throttling my 3.0Ghz processor down to 2.25Ghz while cpu-intensive stuff is happening, I can get slight speed-ups.

Otherwise, suck it up, it probably means that your compile is using your cpu efficiently.
poly-p man
_________________
iVBORw0KGgoAAAANSUhEUgAAA

avatar: new version of logo - see topic 838248. Potentially still a WiP.
Back to top
View user's profile Send private message
jexxie
Tux's lil' helper
Tux's lil' helper


Joined: 12 Oct 2007
Posts: 82
Location: Vancouver, BC

PostPosted: Fri Nov 02, 2007 11:38 pm    Post subject: Reply with quote

If you'd like your compiles and emerging to sieze less of your computers hardware, you can enable the PORTAGE_NICENESS value in your /etc/make.conf

-19 is the highest priority you can set, and 19 is the lowest. Setting your emerges around 15 or so, should give you a speedy system while you compile.
_________________
Rambling sysadmin
My personal site and blog: Phil Dufault
Back to top
View user's profile Send private message
poly_poly-man
Advocate
Advocate


Joined: 06 Dec 2006
Posts: 2477
Location: RIT, NY, US

PostPosted: Fri Nov 02, 2007 11:46 pm    Post subject: Reply with quote

jexxie wrote:
If you'd like your compiles and emerging to sieze less of your computers hardware, you can enable the PORTAGE_NICENESS value in your /etc/make.conf

-19 is the highest priority you can set, and 19 is the lowest. Setting your emerges around 15 or so, should give you a speedy system while you compile.


... but slower compiles. Overall, it's nicer generally to lose your system for a few days (on a full world emerge, for example) than to lose it for longer while libraries upgrade before binaries, etc.

poly-p man
_________________
iVBORw0KGgoAAAANSUhEUgAAA

avatar: new version of logo - see topic 838248. Potentially still a WiP.
Back to top
View user's profile Send private message
linga
Tux's lil' helper
Tux's lil' helper


Joined: 11 Dec 2006
Posts: 131

PostPosted: Sat Nov 03, 2007 10:28 am    Post subject: Reply with quote

Personally, I think it's better to be able to use my computer effectively even while compiling many packages, so I have set PORTAGE_NICENESS="19". If I want to raise the priority of portage I usually do that by running `sudo htop´ and adjusting from there.
Note though that you might not be able to use the computer all the time anyway, during extreme compiles (openoffice, eclipse-sdk assembly phase) unless you have lots of ram (around 2GB).
Back to top
View user's profile Send private message
kirikou
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2006
Posts: 83

PostPosted: Sat Nov 03, 2007 7:38 pm    Post subject: Re: System slow while compiling Reply with quote

Thanks for all your replies!! I will try to play with
Code:
PORTAGE_NICENESS
!!
And for my other problem, do you have any suggestions (I thought it was related to my slowness during compile phase) ?

kirikou wrote:

Another error, that might be related, is that when I mount my external hard drive (160GB, whichi is almost full), it tooks minutes in order to be able to read it's content through nautilus (each time I wonder if nautilus has crashed or not).
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Sat Nov 03, 2007 7:49 pm    Post subject: Reply with quote

poly_poly-man wrote:
jexxie wrote:
If you'd like your compiles and emerging to sieze less of your computers hardware, you can enable the PORTAGE_NICENESS value in your /etc/make.conf

-19 is the highest priority you can set, and 19 is the lowest. Setting your emerges around 15 or so, should give you a speedy system while you compile.


... but slower compiles. Overall, it's nicer generally to lose your system for a few days (on a full world emerge, for example) than to lose it for longer while libraries upgrade before binaries, etc.

poly-p man


First, higher niceness doesn't automatically mean that the compiler will run slow.

It just means that the compiler will have lesser priority that other tasks, in case both ask for a cpu time slice concurrently. The scheduler highly influences the concrete meaning of niceness. If the computer is iddle, then the compiler will run as ever, and will take the same to complete any task. If you are actually working on the computer, there is no point at all in working with an unusable system, so you definitely want higher niceness for portage tasks.

So, if you are using your pc, niceness is a good thing, and if you are away and the pc is iddle, niceness does almost nothing. I can't see where the problem lies.

Niceness doesn't automatically increase your compilation time. Even if you have a -19 niceness for portage (giving it the max priority) it will take hours to compile fvwm if you are running neverwinter nights on the while. It is YOU who slow down a compilation, and not your niceness value. ;)
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Sat Nov 03, 2007 7:52 pm    Post subject: Re: System slow while compiling Reply with quote

kirikou wrote:

Another error, that might be related, is that when I mount my external hard drive (160GB, whichi is almost full), it tooks minutes in order to be able to read it's content through nautilus (each time I wonder if nautilus has crashed or not).


It might just be a nautilus thing. If you can access ok from command line, then nautilus might be the culprit. It would help to know what filesystem are you using on that device. It might just be a fragmentation problem as well (not strange, if the drive is completely full).
Back to top
View user's profile Send private message
kirikou
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2006
Posts: 83

PostPosted: Sat Nov 03, 2007 8:10 pm    Post subject: Reply with quote

Effectively, I can access it without problem from the command line! I did not think about trying it!
The file system on my external hard drive is FAT32.

Code:
It might just be a fragmentation problem as well (not strange, if the drive is completely full).

Is there a way to refragment it correctly (in fact, what does it exactly means) ?
Thanks!
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Sat Nov 03, 2007 8:29 pm    Post subject: Reply with quote

kirikou wrote:
Effectively, I can access it without problem from the command line! I did not think about trying it!
The file system on my external hard drive is FAT32.

Code:
It might just be a fragmentation problem as well (not strange, if the drive is completely full).

Is there a way to refragment it correctly (in fact, what does it exactly means) ?
Thanks!


If you can cd, ls and such without any noticeable delaly from the command line, then the problem is just about nautilus. Maybe it is opening the files for preview or to create thumbnails? That could explain the slow down to a certain degree. Note also that your usb drive might be using usb 1.1, which is even slower than 2.0. To check that, make sure you have ehci in your kernel. On dmesg you should see if the ehci driver is loaded or not. It could be that either your ports are not usb 2.0 capable, your drive is not 2.0 capable, or you don't have ehci on your kernel (or a combination of many of these factors).

Anyway, if you have enabled previews, it will be slow. And even if you don't use them, a fat32 filesystem will many thousands of files will always be slow to open on a graphical browser, overall if mounted in usb. fat32 scales really bad.
Back to top
View user's profile Send private message
kirikou
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2006
Posts: 83

PostPosted: Sat Nov 03, 2007 9:07 pm    Post subject: Reply with quote

Here are the last lines of dmesg (all that was about to my hard drive), EHCI seems to be used...

Code:
usb 1-1: new high speed USB device using ehci_hcd and address 4
usb 1-1: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
scsi 0:0:0:0: Direct-Access     SAMSUNG  SP1614N          TM10 PQ: 0 ANSI: 0
sd 0:0:0:0: [sda] 312581808 512-byte hardware sectors (160042 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] 312581808 512-byte hardware sectors (160042 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda:
sd 0:0:0:0: [sda] Attached SCSI disk
usb-storage: device scan complete


By doing so I noticed a strange line on dmesg :

Code:
cpufreqd[4328]: segfault at 8b0cec87 eip b7fe0699 esp bfe498c8 error 4


Do you think it might causes some slowdown ?
Thanks!
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Sat Nov 03, 2007 10:09 pm    Post subject: Reply with quote

If i am not mistaken, that is the cpu frequency daemon. It has the potential to lower your cpu frequency and that would slow down the whole system, but I don't know if that is the case. I don't know if that segfaults are something normal when using that daemon, because I never used it for any purpose at all. Maybe someone else around knows a bit more about that and can help.
Back to top
View user's profile Send private message
kirikou
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2006
Posts: 83

PostPosted: Sat Nov 03, 2007 10:31 pm    Post subject: Reply with quote

Do you think that options in the kernel like the Preemption model (set to Voluntary Kernel Preemption in my kernel) and Timer frequency (set to 1000 HZ in my kernel) might cause some slowdown ?
My install is quite recent (2 months) and my previous installations worked better... (that's why I think I must have a problem in my kernel configuration!)
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Sat Nov 03, 2007 11:09 pm    Post subject: Reply with quote

kirikou wrote:
Do you think that options in the kernel like the Preemption model (set to Voluntary Kernel Preemption in my kernel) and Timer frequency (set to 1000 HZ in my kernel) might cause some slowdown ?
My install is quite recent (2 months) and my previous installations worked better... (that's why I think I must have a problem in my kernel configuration!)


Kernel preemption should be safe if you are using any recent kernel. Nothing stops you from compiling a new kernel with it disabled and see if that makes any difference, though... just in case.

About the timer, higher numbers are not always the best. It just means that the slices that the kernel uses to think are smaller, so you have a more fine grained control on how the time is shared amongst processes. That is fine if you really need that degree of interactivity. For example, if you need to record a sound source while playing another source and you want your input to be looped and directly mixed on your regular output. Such realtime tasks need an higher degree of responsivity, because every milisecond counts. But it causes also an overhead, since the kernel has to think about what he's going to do 1000 times per second, instead of just 250, for example.

So, if you don't do any specialized real time task, I think that you should just recompile your kernel using a saner setting. I don't think it has anything to do with your problems, though.
Back to top
View user's profile Send private message
linga
Tux's lil' helper
Tux's lil' helper


Joined: 11 Dec 2006
Posts: 131

PostPosted: Sun Nov 04, 2007 10:46 am    Post subject: Reply with quote

As long as cpufreqd is running it should not impact performance a lot since it highers the cpu frequency when its needed and lowers it when the computingpower is not needed. If it crashes then maybe you're stuck at the lowest frequency. I have never used cpufreqd either, I use the ondemand cpufreq governoor instead.
Back to top
View user's profile Send private message
kirikou
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2006
Posts: 83

PostPosted: Wed Nov 07, 2007 10:32 pm    Post subject: Reply with quote

I use the ondemand cpufreq governor too, but I thought that I need cpufreqd in order to "manage" the governor... is it not the case ?
And what is the purpose of cpufreq-utils (another cpu stuff I found in my rc-update (default runlevel)) ?
Thanks!
Back to top
View user's profile Send private message
tarpman
Veteran
Veteran


Joined: 04 Nov 2004
Posts: 1083
Location: Victoria, BC, Canada

PostPosted: Wed Nov 07, 2007 10:37 pm    Post subject: Reply with quote

kirikou wrote:
I use the ondemand cpufreq governor too, but I thought that I need cpufreqd in order to "manage" the governor... is it not the case ?
And what is the purpose of cpufreq-utils (another cpu stuff I found in my rc-update (default runlevel)) ?
Thanks!

No. ondemand manages itself; cpufreqd only controls your system when you're using the userspace governor. cpufreq-utils is a utility that allows you to easily change which governor you're using, among other things.
_________________
Saving the world, one kilobyte at a time.
Back to top
View user's profile Send private message
kirikou
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2006
Posts: 83

PostPosted: Wed Nov 07, 2007 10:44 pm    Post subject: Reply with quote

So there is no problem if I remove both (cpufreqd and cpufreq-utils) with rc-update del ? In fact, I can even un-merge them... ? Thanks!
Back to top
View user's profile Send private message
boerKrelis
Apprentice
Apprentice


Joined: 01 Jul 2003
Posts: 241
Location: The Netherlands

PostPosted: Thu Nov 08, 2007 6:16 am    Post subject: Reply with quote

Is disk trashing amongst the symptoms?
If so, that might indicate excessive swapping, which would explain the unresponsiveness and I/O-problems.
- Use 'top' to look for a high systemload, with 'kswapd' using lots of CPU-time
- Have a look at your memory status (free -m)
If necessary, adjust MAKEOPTS to "-j1", and move your swap to faster disks.
Back to top
View user's profile Send private message
micmac
l33t
l33t


Joined: 28 Nov 2003
Posts: 996

PostPosted: Thu Nov 08, 2007 8:48 am    Post subject: Reply with quote

Do you by any chance use SATA AHCI and th CFQ IO scheduler? If so try if disabling NCQ helps: http://linux-ata.org/faq.html#ncq
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2048
Location: Germany

PostPosted: Thu Nov 08, 2007 10:05 pm    Post subject: Reply with quote

poly_poly-man wrote:
jexxie wrote:
If you'd like your compiles and emerging to sieze less of your computers hardware, you can enable the PORTAGE_NICENESS value in your /etc/make.conf

-19 is the highest priority you can set, and 19 is the lowest. Setting your emerges around 15 or so, should give you a speedy system while you compile.


... but slower compiles. Overall, it's nicer generally to lose your system for a few days (on a full world emerge, for example) than to lose it for longer while libraries upgrade before binaries, etc.

poly-p man


this is not true.

You even SHOULD set it to 19. Not 10 or 15, 19!

Why? Because tasks at 19 become batch-scheduled - and that is very good for compiling.

Btw, the OPs posters problem sounds like swap. Nautilus? So he is using gnome - and gnome is the desktop with the highest demand on memory. Gnome+emerge something = lots and lots of memory used. And swap is really slow....
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
kirikou
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2006
Posts: 83

PostPosted: Mon Nov 12, 2007 8:43 pm    Post subject: Reply with quote

Thanks, I try the PORTAGE_NICENESS and it works wonderful!!
In effect, I'm using gnome.
I have 1G of RAM and even when I don't run emerge, my external hard drive take quite a lot of time to display folder (during this time I can't do anything with nautilus or it will crash).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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