High CPU usage when matlab is idle on Linux

Asked by Livio on 18 Jul 2012
Latest activity Commented on by Livio on 23 Jul 2012

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 Comments

Livio on 19 Jul 2012

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 on 20 Jul 2012

I am stumped, I would contact support.

Walter Roberson on 20 Jul 2012

Different startup scripts?

Also, I would suggest deleting the MATLAB preferences file and re-creating it.

Livio

Products

No products are associated with this question.

1 Answer

Answer by Adam Filion on 20 Jul 2012
Edited by Adam Filion on 20 Jul 2012
Accepted answer

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:

http://www.wired.com/wiredenterprise/2012/07/leap-second-bug-wreaks-havoc-with-java-linux/

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:

http://www.mathworks.com/support/contact_us/index.html

[EDIT fixed links]

3 Comments

Livio on 21 Jul 2012

Uptime is more than one month for sure! This sounds interesting, I will try it on Monday. Thank you.

Adam Filion on 22 Jul 2012

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 on 23 Jul 2012

You are a genius, thank you, it worked. Matlab process takes less than 1% on idle.

Adam Filion

Contact us