High CPU usage when matlab is idle on Linux

Hi all, I installed Matlab 7.14.0.739 (R2012a) on a core i5 machine with 4 GiB of RAM. The OS is Ubuntu 11.04 64 bit. Matlab works fine, (apart from some Unix version related issues), but when idle it takes more than 100% CPU. The top command reports:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
17162 newcesir 20 0 1137m 382m 70m S 107 4.8 2:35.14 MATLAB
9 root 20 0 0 0 0 S 21 0.0 898:12.00 ksoftirqd/1
3 root 20 0 0 0 0 S 19 0.0 923:00.86 ksoftirqd/0
13 root 20 0 0 0 0 S 10 0.0 779:41.32 ksoftirqd/2
16 root 20 0 0 0 0 S 0 0.0 640:55.65 ksoftirqd/3
The 4 ksoftirqd processes have something to do with interrupt handling for the 4 processors, and are assciated with the matlab running. The machine is multi user, and having one cpu occupied for every matlab instance started is not good at all. Does anyone know why this is happening? Thank you

4 件のコメント

Ken Atwell
Ken Atwell 2012 年 7 月 18 日
This is not normal behavior. Does this happen if you start MATLAB and do nothing, or does it only happen after you've used MATLAB a while?
Livio
Livio 2012 年 7 月 19 日
It happens immediately after starting matlab and doing nothing else. How can this be a normal behaviour? I checked on a collegue's Mac, with a different version of Matlab (Unix matlab, anyway), and the cpu usage on idle was almost 0%
Ken Atwell
Ken Atwell 2012 年 7 月 20 日
I am stumped, I would contact support.
Walter Roberson
Walter Roberson 2012 年 7 月 20 日
Different startup scripts?
Also, I would suggest deleting the MATLAB preferences file and re-creating it.

サインインしてコメントする。

 採用された回答

Adam Filion
Adam Filion 2012 年 7 月 20 日
編集済み: Adam Filion 2012 年 7 月 20 日

4 投票

Have you rebooted your Linux machine since July 1? If not then that may be the problem. There was a bug with Linux that caused all kinds of problems with the leap second on July 1:
This bug has caused some strange behavior for various programs, MATLAB included. Rebooting the machine fixes the problem. If that doesn't resolve it then I recommend contacting tech support:
[EDIT fixed links]

6 件のコメント

Livio
Livio 2012 年 7 月 21 日
編集済み: Livio 2012 年 7 月 21 日
Uptime is more than one month for sure! This sounds interesting, I will try it on Monday. Thank you.
Adam Filion
Adam Filion 2012 年 7 月 22 日
Please let me know if it does resolve it. Our tech support offices have not heard of this particular behavior in conjunction with this bug yet, and I can forward it to them.
Livio
Livio 2012 年 7 月 23 日
You are a genius, thank you, it worked. Matlab process takes less than 1% on idle.
Helmar
Helmar 2013 年 7 月 24 日
I am experiencing similar behaviour on my laptop running debian wheezy 64-bit with some unstable packages and R2013a. I reboot it quite often, the CPU usage problem persists:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
11485 helmar 20 0 2559m 626m 115m S 51.9 16.1 52:37.03 MATLAB
3824 root 20 0 188m 75m 26m S 12.5 1.9 11:36.72 Xorg
24046 helmar 20 0 580m 20m 11m S 5.3 0.5 0:02.85 gnome-terminal
249 root -51 0 0 0 0 S 2.3 0.0 0:41.82 irq/21-uhci_hcd
This however does NOT happen right away after starting Matlab.
Iain W
Iain W 2013 年 7 月 24 日
編集済み: Iain W 2013 年 7 月 24 日
I've just found this thread after experiencing the same issue.
Fresh Ubuntu 13.04 x64 install, fresh R2013a install.
I've just restarted Matlab in an attempt to reproduce the problem, but it hasn't thus far - as above maybe it doesn't do it right away. If I can reliably reproduce I'll post back.
EDIT: Ok, so after reading this comment: https://www.mathworks.co.uk/matlabcentral/answers/38094#comment_141709
I did some tests. I can confirm that in my case triggering the help (then closing it) causes high idle cpu usage.
To reproduce
1 Start matlab.
2 observe idle cpu usage is low.
3 press F1 to pop up help window, close it.
4 Observe erratic/high CPU usage.
I tried the fix they suggest (changing the help renderer) and that appears to solve the problem for me.
Helmar
Helmar 2013 年 8 月 2 日
Worked for me too!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by