Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
High cpu-usage on copy files
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Vrenn
Apprentice
Apprentice


Joined: 15 Dec 2004
Posts: 285

PostPosted: Tue Dec 22, 2015 12:47 pm    Post subject: High cpu-usage on copy files Reply with quote

Dear Gentoo experts!

I solved many problems with my Asus ROG 751JY (Haswell). But some remain.
I noticed copy a file from one drive to another (no matter if they are ssd, hdd or usb) my kde4.14.8 has high cpu-usage on one core.

Ubuntu (Unity), Fedora23 (gnome) and arch (desktopless) have low cpu-usage on copy files.
Kubuntu 15.10 had high cpu-usage too!

Is this a kde-problem or do I have some missing kernel opt?
What is your cpu in KDE on copy files?
Do AHCI PCIe or SATA drives need extra dma-engine drivers?

Thanks for your help!
_________________
With nice greetings
Vrenn
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42564
Location: 56N 3W

PostPosted: Tue Dec 22, 2015 1:30 pm    Post subject: Reply with quote

Vrenn,

You can test if its KDE or or not by doing a copy from a shell, not a shell window in KDE.

High CPU use on copy usually indicates that PIO mode is in use, rather than DMA mode.
PIO - Programmed Input/Output requires that the CPU read and write every byte.

DMA - Direct Memory Access, only needs the CPU to set up the direction, the buffer location, buffer size and tell the DMA controller to go.
That's just a few bytes.

USB versions below 3.0 only support PIO.
USB 3.0 and SATA should all use DMA.
PATA can use either.
SATA running in PATA compatibility mode usually uses PIO.

Please post the output of lspci, which may offer some hints.
Also put your dmesg onto a pastebin, there will be more detail there.

-- edit --

You are posting about several problems. Please only work on one at a time or both you and your helpers will get confused.
Your helpers may not have visibility of changes made to your system due to you working other issues.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Vrenn
Apprentice
Apprentice


Joined: 15 Dec 2004
Posts: 285

PostPosted: Tue Dec 22, 2015 2:49 pm    Post subject: Reply with quote

Thank you for your quick answer.
I'm sorry that posting multiple problems is bad, I'll go slow, (just one as you say) next time. But please understand me, that I use gentoo since 2003 and this machine makes me despair.
I thought splitting problems up is better, but these two might have to do something with each other so the solution for one could be somehow a solution for the other.

I especially mean problem "Samsung SSD producing host bus errors" https://forums.gentoo.org/viewtopic-t-1035738.html
But the upper one just hits kernel 3.18.22+. The high-cpu-copy-problem also appears in my current gentoo kernel 3.14.58.

To your questions:
Quote:
You can test if its KDE or or not by doing a copy from a shell, not a shell window in KDE.

Disable kdm in systemd copy from the ssd to hdd (both build in) top shows me that cp needs 8-12% cpu power (which might be on an 8-core cpu ~100% for one core)

PIO/dma: Any way to ask the kernel that mode he now uses on this sata drive(s)?
Does disabled NCQ trigger PIO?

lspci:

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5)
00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5)
00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d5)
00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d5)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation HM87 Express LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)
01:00.0 VGA compatible controller: NVIDIA Corporation GM204M [GeForce GTX 980M] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio Controller (rev a1)
3b:00.0 Network controller: Intel Corporation Wireless 7260 (rev bb)
3c:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
3d:00.0 SATA controller: Samsung Electronics Co Ltd XP941 PCIe SSD (rev 01)


dmesg: http://pastebin.com/ixrLuHZr
_________________
With nice greetings
Vrenn
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42564
Location: 56N 3W

PostPosted: Tue Dec 22, 2015 5:28 pm    Post subject: Reply with quote

Vrenn,

Code:
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05)

This is one of these SATA chip sets that has a crippled IDE mode. Here it says [AHCI mode], so you are good.
In IDE mode, its very slow. IDE mode is intended to be used once, only by WinXP users, so that they can install the AHCI driver.
Then they switch to AHCI mode.

You are using SATA as it was intended to be used. That includes DMA mode.

Looking through dmesg ...
Code:
[    2.999595] r8169 0000:3c:00.0 enp60s0: link down
[    2.999645] IPv6: ADDRCONF(NETDEV_UP): enp60s0: link is not ready
[    6.004070] r8169 0000:3c:00.0 enp60s0: link up
[    6.004098] IPv6: ADDRCONF(NETDEV_CHANGE): enp60s0: link becomes ready
[  135.400444] nvidia 0000:01:00.0: irq 44 for MSI/MSI-X
what happened there?
That's a two minute pause in your boot process.

At
Code:
[  162.465024] NETDEV WATCHDOG: enp60s0 (r8169): transmit queue 0 timed out
something nasty happened too.

We have already discussed your 3.14.58-gentoo. You need to update it. It may help with this issue too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Vrenn
Apprentice
Apprentice


Joined: 15 Dec 2004
Posts: 285

PostPosted: Tue Dec 22, 2015 9:15 pm    Post subject: Reply with quote

Thanks for giving me certainty in the AHCI-mode, your opinion is important for me.
I have looked in UEFI, Asus did deliver the notebook in AHCI-mode.

I want to upgrade the kernel, you are right. But another problem I have is that all kernels (gentoo&vanilla) above 3.18.21 producing host bus errors on my samsung ssd
Now it seems for me that this might be my key-problem. So I'm stuck with 3.14 hoping it is maintained in the stable tree for some time.

The enp60s0 thing is a normal behaviour in my case I believe:
I use networkmanager getting its IP by dhcp. As I need to run server-demons sometimes on my laptop, it gets a "fixed dhcp address" from my router (AVM Fritzbox).
Now, when I reboot my laptop in a short time (e.g. testing another kernel) my router refuses to give out the mac-fixed-address a second time and looks some time if it is really free. So networkmanager doesn't get an IP-config in the first place, but is served after the two minutes.
This doesn't happen in normal laptop usage.

edit: And I might forgot to tell, that I disabled kdm/X in systemd for the copy-test in the real shell. I started both after the test so nvidia can be late in dmesg. Sorry about that.
_________________
With nice greetings
Vrenn
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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