High CPU Utilization

Moderators: odroid, mdrjr

High CPU Utilization

Unread postby rockla » Mon Feb 12, 2018 10:57 pm

Today onwards i started facing issue of high CPU usage during usage of qbittorrent and this came all of sudden , CPU peaks at 60% and load average reaches around 4 causing severe slowdown in media operations while watching movies via minidlna

Please note similar size torrent was getting downloaded perfectly fine till yesterday , please let me know how can i investigate this further, the memory usage is very low - 30MB
rockla
 
Posts: 224
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: english
ODROIDs: C1,C2

Re: High CPU Utilization

Unread postby rooted » Mon Feb 12, 2018 11:13 pm

Easiest thing to do is try a different torrent client on the same torrent, if it works properly you know it's something wrong with qbitorrent
User avatar
rooted
 
Posts: 5873
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english

Re: High CPU Utilization

Unread postby rockla » Tue Feb 13, 2018 10:29 am

I actually tried right after creating this post the same torrent on rtorrent and even with that Cpu usage was going up, haven't tried on deluge because it my defaults uses lot of Cpu
rockla
 
Posts: 224
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: english
ODROIDs: C1,C2

Re: High CPU Utilization

Unread postby rooted » Tue Feb 13, 2018 11:44 am

Anything in the system log? Are you sure there is free memory? How fast is the torrents going and for how long?
User avatar
rooted
 
Posts: 5873
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english

Re: High CPU Utilization

Unread postby odroid » Tue Feb 13, 2018 1:24 pm

If the CPU governor is not "performance" mode, it is not easy to measure the CPU utilization due to the dynamic CPU frequency.
User avatar
odroid
Site Admin
 
Posts: 29088
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: High CPU Utilization

Unread postby rockla » Tue Feb 13, 2018 1:33 pm

odroid wrote:If the CPU governor is not "performance" mode, it is not easy to measure the CPU utilization due to the dynamic CPU frequency.


CPU is interactive mode which has been there by default.

rooted wrote:Anything in the system log? Are you sure there is free memory? How fast is the torrents going and for how long?


Even with one torrent downloading it slows down , I have measured the memory usage and its not high at all only CPU I'm downloading @ 100Mbps so get around 11MB per second
rockla
 
Posts: 224
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: english
ODROIDs: C1,C2

Re: High CPU Utilization

Unread postby odroid » Tue Feb 13, 2018 3:01 pm

Can you check the /etc/default/cpufrequtils file?
Code: Select all
odroid@odroid64:~$ cat /etc/default/cpufrequtils                               
GOVERNOR="performance"


Even though "/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" is "interactive", the governor should be "performance" if "/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq" is constantly 1536000.
User avatar
odroid
Site Admin
 
Posts: 29088
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: High CPU Utilization

Unread postby mad_ady » Tue Feb 13, 2018 5:09 pm

Use top to see if there is a process/kernel thread stuck in 100% usage. Also, does the issue happen after a reboot?
User avatar
mad_ady
 
Posts: 4875
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1

Re: High CPU Utilization

Unread postby rockla » Tue Feb 13, 2018 8:19 pm

Code: Select all
root@odroid64:~# cat /etc/default/cpufrequtils
cat: /etc/default/cpufrequtils: No such file or directory
root@odroid64:~# l /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
-rw-r--r-- 1 root root 4096 Feb 13 07:28 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
interactive


It only happens on downloading
Attachments
Screen.jpg
Screen.jpg (210.01 KiB) Viewed 1038 times
rockla
 
Posts: 224
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: english
ODROIDs: C1,C2

Re: High CPU Utilization

Unread postby rooted » Tue Feb 13, 2018 8:41 pm

There is no problem I see, fast torrents cause high CPU usage.

Lower the priority of the torrent client, should be anyway if you are using the device for watching media at the same time.
User avatar
rooted
 
Posts: 5873
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english

Re: High CPU Utilization

Unread postby rockla » Tue Feb 13, 2018 9:14 pm

Thanks also I see minidlna and samba also using resources while download is in progress any better media server for c2 don't need transcoding my tv can handle that
rockla
 
Posts: 224
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: english
ODROIDs: C1,C2

Re: High CPU Utilization

Unread postby odroid » Tue Feb 13, 2018 10:47 pm

If you use the minimal image, install CPU frequency utility via "sudo apt install cpufrequtils".
Please keep monitoring the CPU frequency with "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq".
It must be 1.5Ghz (1536000).
User avatar
odroid
Site Admin
 
Posts: 29088
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: High CPU Utilization

Unread postby rockla » Wed Feb 14, 2018 2:13 pm

Changed the governor to performance but i dont see any file /etc/default/cpufrequtils got created

root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
interactive


Code: Select all
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
250000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
250000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
250000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1000000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1000000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1536000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
500000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
500000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
500000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
250000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1296000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1000000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
250000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1296000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1296000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1296000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1536000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
1536000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
500000
root@odroid64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
250000
rockla
 
Posts: 224
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: english
ODROIDs: C1,C2

Re: High CPU Utilization

Unread postby odroid » Wed Feb 14, 2018 2:17 pm

Try "echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" and check the cur_freq again.
User avatar
odroid
Site Admin
 
Posts: 29088
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: High CPU Utilization

Unread postby rockla » Wed Feb 14, 2018 2:39 pm

Yes now its always 1.53Ghz does this mean it would heat up quickly ?
rockla
 
Posts: 224
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: english
ODROIDs: C1,C2

Re: High CPU Utilization

Unread postby odroid » Wed Feb 14, 2018 2:44 pm

Not really if your computing load is not so high.

Keep monitoring the CPU temperature with htop to make sure.
Code: Select all
cat /sys/class/thermal/thermal_zone0/temp


I really want to know whether the qbittorrent is a really heavy software or not.
User avatar
odroid
Site Admin
 
Posts: 29088
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: High CPU Utilization

Unread postby rockla » Wed Feb 14, 2018 2:51 pm

I've tested on deluge as well its the same , infact qbittorrent is the lightest amongst the client
rockla
 
Posts: 224
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: english
ODROIDs: C1,C2

Re: High CPU Utilization

Unread postby odroid » Wed Feb 14, 2018 3:14 pm

What is the CPU usage by qbittorrent when the CPU clock is constantly 1.5Ghz?
User avatar
odroid
Site Admin
 
Posts: 29088
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: High CPU Utilization

Unread postby rockla » Wed Feb 14, 2018 3:44 pm

It at times used 120% ?
rockla
 
Posts: 224
Joined: Sat Dec 27, 2014 6:50 pm
languages_spoken: english
ODROIDs: C1,C2

Re: High CPU Utilization

Unread postby rooted » Wed Feb 14, 2018 4:00 pm

It's a combination of torrent and minidlna, tons of IO.

If you lower the priority of Qtbittorent I think it will be fine, set it to idle.
User avatar
rooted
 
Posts: 5873
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english

Re: High CPU Utilization

Unread postby thatchunkylad1989 » Sat Feb 17, 2018 10:31 pm

rooted wrote:It's a combination of torrent and minidlna, tons of IO.

If you lower the priority of Qtbittorent I think it will be fine, set it to idle.


How do I do that?
thatchunkylad1989
 
Posts: 212
Joined: Sun Dec 24, 2017 12:29 am
languages_spoken: english
ODROIDs: C2, XU4

Re: High CPU Utilization

Unread postby rooted » Sat Feb 17, 2018 10:58 pm

You can do it through htop.
User avatar
rooted
 
Posts: 5873
Joined: Fri Dec 19, 2014 9:12 am
Location: Gulf of Mexico, US
languages_spoken: english

Re: High CPU Utilization

Unread postby thatchunkylad1989 » Sat Feb 17, 2018 11:18 pm

rooted wrote:You can do it through htop.


Thanks. ;)
thatchunkylad1989
 
Posts: 212
Joined: Sun Dec 24, 2017 12:29 am
languages_spoken: english
ODROIDs: C2, XU4


Return to Issues

Who is online

Users browsing this forum: No registered users and 4 guests