View Full Version : MATLAB GUI is very slow
leeping
November 25th, 2007, 09:27 PM
Dear community,
I just did a fresh install of Gutsy, and I'm finding the MATLAB GUI just as slow as it was when I was using Dapper. Is there something I can do to speed it up? The GUI is beyond slow - e.g. in the Array Editor, it takes me several seconds to type entries into a matrix.
Can it have anything to do with the Java Runtime Environment?
Thanks everyone,
- Lee-Ping
Aniongap
November 27th, 2007, 03:53 AM
Hi,
one of problems may be that processor spends a lot of its time in processing. You can watch kernel max threads.
take a look at
sudo sysctl -a | sort | more
You can change kernel.threads-max for testing:
sudo sysctl -w kernel.threads-max="number"
try double times less number than shows kernel.threads-max
also how much ram you use?
somentimes adding ram is the best solution.
kevmitch
July 6th, 2008, 02:56 AM
I also found matlab GUI to be excruciating. This seems to be exacerbated (though not entirely caused by) running it over XDMCP. I'm pretty sure this is not a threads issue since I strongly doubt matlab is trying to spawn more than 147456 threads (what I get from sysctrl -a | grep threads-max). And even if it was, I don't see how increasing that number could possibly increase performance even on my 8 processor machine. It is also not a ram issue since I've go 8GB of it.
I'm pretty sure Java Virtual Machine #vomit# is indeed the cuplrit as running with -nojvm eliminates all problems. I would recommend running matlab like this as a habit:
echo "alias matlab='matlab -nojvm -nosplash'" >> ~/.bashrc
However, since I have users that are likely attached to the GUI, I decided to install the x86 version along side the x86_64 version and found the GUI to be an order of magnitude more tolerable. I would consider this either a bug in matlab or a bug in Java. Well, actually I consider it a bug in matlab for using Java Virtual Machine in the first place.
kevmitch
July 6th, 2008, 03:26 AM
Oh, something else you might try, though it didn't seem to solve the problem for me is use your system Java Virtual Machine (which will likely be more up to date):
Assuming you have sun-java6-jre installed
MATLAB_JAVA=/usr/lib/jvm/java-6-sun-1.6.0.06/jre/ matlab
This also fixes a problem that matlab seems to have with the new xserver.
kevmitch
July 6th, 2008, 05:28 AM
By the way, to run the x86 version when you also have the x86_64 version installed,
matlab -glnx86
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.