FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Kubuntu User

 
 
LinkBack Thread Tools
 
Old 04-22-2012, 04:11 PM
Bas Roufs - message in English
 
Default Still too much CPU consumption - especially when using Kontact.

Hello everybody

*

Today, I have been tweeking with a view to limiting the use of CPU by the system Kubuntu 11.10. I have followed most of the advises at the tutorial "How to make Kubuntu (KDE) blazing fast and optimise it for performance".

See: http://bit.ly/tRJzap

This has helped to effectively deal with the worst CPU problems I have experienced recently. However, the consumption of CPU is still 60 up to and including 100% in certain situations - notably when syncing IMAP-folders in KMAIL/ Kontact. As a matter of consequence, it is very difficult to multitask with one or a few other packages, when doing so. At one of the two laptops I am working with, I even need to use some workarounds via the system activity monitor to get Kontact started at all: "killing" one or two processes, while prioritising others.

Be so so kind to provide me with feedback and ideas to handle this problem.

Respectfully yours,

Bas Roufs.

*

*


--

Bas G. Roufs MA

Van 't Hoffstraat 1

NL-3514 VT Utrecht

The Netherlands

E. BasRoufs@gmail.com

Mob. +31 6 446 835 10

Tel. +31 30 785 40

Websites in construction:

BasRoufs.eu
Viaconsensus.nl
RainbowGathering.eu
Open source OS: Linux Kubuntu 11.10.
--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 04-23-2012, 07:38 AM
Guus
 
Default Still too much CPU consumption - especially when using Kontact.

On 22/04/12 18:11, Bas Roufs - message in English wrote:



Hello
everybody

*

Today, I have
been tweeking with a view to limiting the use of CPU by the
system Kubuntu 11.10. I have followed most of the advises at
the tutorial "How to make Kubuntu (KDE) blazing fast and
optimise it for performance".

See:
http://bit.ly/tRJzap

This has
helped to effectively deal with the worst CPU problems I have
experienced recently. However, the consumption of CPU is still
60 up to and including 100% in certain situations - notably
when syncing IMAP-folders in KMAIL/ Kontact. As a matter of
consequence, it is very difficult to multitask with one or a
few other packages, when doing so. At one of the two laptops I
am working with, I even need to use some workarounds via the
system activity monitor to get Kontact started at all:
"killing" one or two processes, while prioritising others.

Be so so kind
to provide me with feedback and ideas to handle this problem.

Respectfully
yours,

Bas Roufs.


Hi bas,



This sounds very annoying. The system being non-responsive effective
prevents you from working properly.

Did you try isolating the culprit in a cgroup? That way you can
maximize the processor power it is allowed to use.

I didnt try it yet, but I plan to if I get problems like this.



Below a summary of what I read in the Dutch "Linux magazine"
2012-02. Hope it helps.

Remember to change names to your own situation.



mkdir -p /cgroup/cpu

mount -t cgroup -o cpu none /cgroup/cpu

(check with ls -l /cgroup/cpu it works, you should get something
like:



root@mahatma:/# mkdir -p /cgroup/cpu

root@mahatma:/# mount -t cgroup -o cpu none /cgroup/cpu

root@mahatma:/# ls -l /cgroup/cpu

total 0

-rw-r--r-- 1 root root 0 2012-04-23 05:24 cgroup.clone_children

--w--w--w- 1 root root 0 2012-04-23 05:24 cgroup.event_control

-rw-r--r-- 1 root root 0 2012-04-23 05:24 cgroup.procs

-rw-r--r-- 1 root root 0 2012-04-23 05:24 cpu.rt_period_us

-rw-r--r-- 1 root root 0 2012-04-23 05:24 cpu.rt_runtime_us

-rw-r--r-- 1 root root 0 2012-04-23 05:24 cpu.shares

-rw-r--r-- 1 root root 0 2012-04-23 05:24 notify_on_release

-rw-r--r-- 1 root root 0 2012-04-23 05:24 release_agent

-rw-r--r-- 1 root root 0 2012-04-23 05:24 tasks

root@mahatma:/# cat /cgroup/cpu/cpu.shares

1024



The 1024 is equal to 100% of your CPU. All processes in the file
"tasks" share these 1024 cycles.



Now suppose you have a certain set of processes (or only one) that
hog the cpu.

Then you create a new directory and direct these processes to that
directory.

Only this time you maximize the number of cycles it is allowed to
use.



First you create a subdirectory under CPU, this doubles the number
of cycles to 2x1024. Then you limit the number of cycles by
overwriting the cpu.shares file with a smaller number. Then you copy
the processes that you want limited to the tasks file in the
subdirectory.



From that time on, these processes should be limited in CPU use to
the shares you specified. I copied from my machine, but dont have
any processes to put in tasks:



root@mahatma:/cgroup/cpu# mkdir vreters

root@mahatma:/cgroup/cpu# ls -l vreters/

total 0

-rw-r--r-- 1 root root 0 2012-04-23 09:27 cgroup.clone_children

--w--w--w- 1 root root 0 2012-04-23 09:27 cgroup.event_control

-rw-r--r-- 1 root root 0 2012-04-23 09:27 cgroup.procs

-rw-r--r-- 1 root root 0 2012-04-23 09:27 cpu.rt_period_us

-rw-r--r-- 1 root root 0 2012-04-23 09:27 cpu.rt_runtime_us

-rw-r--r-- 1 root root 0 2012-04-23 09:27 cpu.shares

-rw-r--r-- 1 root root 0 2012-04-23 09:27 notify_on_release

-rw-r--r-- 1 root root 0 2012-04-23 09:27 tasks

root@mahatma:/cgroup/cpu# cd vreters

root@mahatma:/cgroup/cpu/vreters# cat cpu.shares

1024

root@mahatma:/cgroup/cpu/vreters# echo 256 > cpu.shares



Now you have 1024 + 256 cycles: about 20% for all processes in this
tasks file. The tasks file is currently empty.

All you have to do is copy 199001 to tasks (if that is the process
that is hogging the CPU): echo 19901 > tasks



From then on, you should have a more responsive system. You can find
out what is wrong with the process later.



I really hope this helps.

*

--

Kind regards, Guus Bonnema.


--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 04-23-2012, 11:34 AM
Bas Roufs - Nederlandstalige boodschap
 
Default Still too much CPU consumption - especially when using Kontact.

Hallo Guus

*

Dank je wel, thank you very much, for your really useful and elaborate answer. One question remains for now. At the very end of your reply, you write:

*

> Now you have 1024 + 256 cycles: about 20% for all processes in this

> tasks file. The tasks file is currently empty.>

> All you have to do is copy 199001 to tasks (if that is the process

> that is hogging the CPU): echo 19901 > tasks

*

When trying "echo 19901 >tasks", I got the following result:

*

root@Viaconsensus-travel:/cgroup/cpu/vreters# echo 19901 >tasks

bash: echo: write error: No such process

*

"echo 199001 >tasks" (with 1 zero more) delivered the same non-result.

That's why I am wondering how exactly to get to know which task is "hogging the CPU".

*

>

> From then on, you should have a more responsive system. ...

> I really hope this helps.

*

After getting a reply to the one question above, I will try out the last part of the solution you propose. In this forum, I will briefly report the result.

*

*

> You can find

> out what is wrong with the process later.

This is perfectly OK.

Respectfully yours,

Bas.







--

Drs. Bas. G. Roufs

Van 't Hoffstraat 1

NL-3514 VT Utrecht

Nederland

E. BasRoufs@gmail.com

M. +31 6 446 835 10

T. +31 30 785 20 40

Websites in constructie:

BasRoufs.eu
Viaconsensus.nl
RainbowGathering.eu
Open source OS: Linux Kubuntu 11.10.
--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 04-23-2012, 01:57 PM
Bas Roufs - message in English
 
Default Still too much CPU consumption - especially when using Kontact.

Hello Guus and Everybody Else


*

> Now you have 1024 + 256 cycles: about 20% for all processes in this

> tasks file. The tasks file is currently empty.>

> All you have to do is copy 199001 to tasks (if that is the process

> that is hogging the CPU): echo 19901 > tasks

*

See: http://www.unixtutorial.org/commands/top/

Is this page relevant when trying to find out which task exactly to copy to the file "/cgroup/cpu/vreters/tasks"? (-/tasks is the extra file aimed handeling one of the CPU consuming processes.)

*

This is the upper part of the list of processes generated by the "top" command:



*

Is it PID 1826 or 1765 that I need to copy to the extra task file?

*

Respectfully yours,

Bas.
--

Bas G. Roufs MA

Van 't Hoffstraat 1

NL-3514 VT Utrecht

The Netherlands

E. BasRoufs@gmail.com

Mob. +31 6 446 835 10

Tel. +31 30 785 40

Websites in construction:

BasRoufs.eu
Viaconsensus.nl
RainbowGathering.eu
Open source OS: Linux Kubuntu 11.10.
--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 

Thread Tools




All times are GMT. The time now is 10:17 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org