How can I optimize my computer for heavy calculations in Matlab?

In summary, the conversation discusses how to improve the capacity of a Toshiba portable computer for heavy calculations in Computational Fluid Dynamics. The main issue is the computer's limited RAM, causing it to slow down and increase the time of computation. Suggestions are made to increase the RAM, tweak the processor, and upgrade the hard drive, but it is noted that these may not provide significant improvement. The conversation ends with the realization that saving up for more RAM may be the best solution.
  • #1
Clausius2
Science Advisor
Gold Member
1,440
7
I usually employ a Toshiba portable computer of 2.8Ghz and 500MB RAM to make heavy calculations of Computational Fluid Dynamics. It runs under Windows XP Home.

I was wondering how can I improve the capacity of dealing with data of my computer. The fact is I use mainly Matlab v6.5 (proffesional) to do calculations.

When I define some arrays of 10*10^6 elements or so, I notice in the task manager that the computer is dealing with 700 MB when starting the calculations. Sure it slows down the processing speed and so the time of computation increases.

I don't know if there is some trick to deliver the computer of inneccesary data or capacity which runs in a background mode, or if it is possible to use more virtual memory dedicated to Matlab or so.

Do you know something about it?

Thanks
 
Computer science news on Phys.org
  • #2
More ram. If your process is consuming 700MB and you only have 500Mb then the other 200(it's actually a lot more because windows takes up ram too) is being pushed to and fromthe HD(much much slower). Max out your computers ram.
 
  • #3
faust9 said:
More ram. If your process is consuming 700MB and you only have 500Mb then the other 200(it's actually a lot more because windows takes up ram too) is being pushed to and fromthe HD(much much slower). Max out your computers ram.


Although I appreciate your answer, it is a trivial one.

I am going to add the next requirement "how to increase my computer power without spending any money".

What happens if I increase the part of memory provided by the HD?. Will it enhance faster calculations?.
 
  • #4
Clausius2 said:
Although I appreciate your answer, it is a trivial one.

I am going to add the next requirement "how to increase my computer power without spending any money".

What happens if I increase the part of memory provided by the HD?. Will it enhance faster calculations?.

You really don't. Your stated problem is a piece of software is using vast amounts of memory to complete a calculation. Part of that memory has to reside on the harddrive (which is very bad because calculations generally quick access to all of the data) so MATLAB is moving information to and from the HD instead of in ram.

If your running XP go to the systems preferences and select the fastes system circle under the performance tab. If you have access to the Linux version of MATLAB you could give that a try. I use dual boot XP/RedHat computers and have found Matlab works faster under Linux than XP.

Can you break you calculations down into smaller steps? That would also help.

The answer to your last question is no. The HD is very, very very slow compared to your processor and RAM. No matter how mach page memory you allocate on the HD, the HD will still be 10x or slower than RAM. You want to avoid the HD as much as humanly possible for doing computations.
 
  • #5
also what type of processor do you have? secondly I wouldn't recommend doing it on a laptop to begin with, and the only way to substantialy increase the power would be to spend money on new parts, such as a 3.6 p4 with HT, and possible 1 or maybe 2 gigs of ram(total), because if you had a desktop, you could buy a new fan, which would keep your processor cooler, and have a slight increase in performance - also, though i don't encourage it, is to overclock your processor, I've heard of some processors getting a full 1 ghz extra, usualy at most though under profesional supervision.

but i encourage you to save up, or, sounding as though your a professor, see if you can get your department to aportion part of there budget to getting your department new computers, or you can buy a custom pc from people like dell, gateway(not encouraged) and high performance places such as alienware and falcon(thats the right bird correct? lol i know there's a high performance pc developer with there name the same as a bird, but i wasnt sure if it was falcon or not)
 
  • #6
Tweaking the processor isn't likely to show much improvement. As was identified, the problem is that the computation is by page swapping. In fact, I bet if the OP looked at the performance tab of the task manager, the CPU usage would be well below 100%.

The only way to speed up the computation is to make it fit in memory, either by finding some way to do the computation with less memory, or by increasing the RAM.
 
  • #7
Another way to spend your money:

Many laptops come with relatively slow hard drives. If yours has one of those 4200 rpm drives, upgrading to a 5400 rpm or better yet a 7200 rpm drive will give a significant performance boost.
 
  • #8
faust9 said:
The answer to your last question is no. The HD is very, very very slow compared to your processor and RAM. No matter how mach page memory you allocate on the HD, the HD will still be 10x or slower than RAM. You want to avoid the HD as much as humanly possible for doing computations.

Thanks for that information. Eventually I increased the memory employed by hard disk at the control panel. But you have said it slows down the calculation, so I'll undo it. By the way my computer is a Pentium IV.

hurkyl said:
Tweaking the processor isn't likely to show much improvement. As was identified, the problem is that the computation is by page swapping. In fact, I bet if the OP looked at the performance tab of the task manager, the CPU usage would be well below 100%.

Sorry, but I haven't understood this words at all. Either you're talking for computer people or the words employed are very advanced to me. Could you "translate" it into a form in which a stupid man can understand them?.

Thanks also to TsunamiJoe and gnome.

I am going to have to save up some money for that RAM. :cry:
 
  • #9
If you push CTRL-SHIFT-ESC, you'll open the Windows Task Manager. It has a "performance" tab in which you can see the CPU Usage. I would guess that it isn't running 100% during your calculation -- thus, getting a better processor won't help.
 
  • #10
Hurkyl said:
If you push CTRL-SHIFT-ESC, you'll open the Windows Task Manager. It has a "performance" tab in which you can see the CPU Usage. I would guess that it isn't running 100% during your calculation -- thus, getting a better processor won't help.

Maybe it is not at 100% but if I move a bit the mouse, I assure you my computer falls down and a re-start will be needed.

As you've said, I don't believe is not a question of processor speed but capacity of handling with data. This evening I've tried to plot a contour plot of a matrix of 10e7 elements and I have been waiting 10 minutes without seeing nothing.
 
  • #11
Hurkyl said:
If you push CTRL-SHIFT-ESC, you'll open the Windows Task Manager. It has a "performance" tab in which you can see the CPU Usage. I would guess that it isn't running 100% during your calculation -- thus, getting a better processor won't help.

The processor might actually be running at 100% but that would be from having to move vast amounts of data onto and off of the HD along with complex calculations on large matrices.

Clausius2 your are still asking a lot of your computer when you try to plot a 10^7 data point graph(That is a lot of data points). Could you possibly graph few points on a single graph and simply make a few graphs over smaller domains? Or, free up some of your GPU resources by selecting the minimum screen resolution and minimum color depth(My laptop goes down to 600x800 @ 256 colors). That will free up some of your GPU so it can process your graphical data. Also, does your laptop have a separate GPU and associated memory or does your laptop have a GPU which uses shared memory(some laptops say 32Mb of shared graphics memory). If your memory is shared see if you can play with those settings to free up some resources for your processor when doing the calculations and realocate resources when you want to display the results.
 

1. How does increasing computer power affect the speed of processing?

Increasing computer power generally results in faster processing speeds. This is because higher computer power allows for more complex calculations to be performed in a shorter amount of time, leading to quicker overall processing.

2. What factors contribute to the increase in computer power?

There are several factors that contribute to the increase in computer power, including improvements in hardware such as processors and memory, advancements in software and algorithms, and the use of parallel processing and cloud computing.

3. How does increasing computer power impact the size and storage capabilities of computers?

As computer power increases, the size of computers tends to decrease while their storage capabilities increase. This is due to the development of smaller and more efficient hardware components, as well as advancements in data compression and storage technologies.

4. What are the potential benefits of increasing computer power?

The potential benefits of increasing computer power include faster processing speeds, improved performance of complex tasks and software, increased storage capabilities, and the ability to handle larger amounts of data. This can lead to more efficient and effective use of technology in various industries and fields.

5. Are there any potential drawbacks to increasing computer power?

While increasing computer power has many benefits, there are also potential drawbacks. These include the high costs associated with developing and implementing new technologies, environmental concerns related to the production and disposal of electronic devices, and the potential for increased dependence on technology.

Similar threads

Replies
4
Views
1K
Replies
2
Views
3K
Replies
14
Views
12K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
4K
  • Programming and Computer Science
Replies
6
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
10K
Replies
4
Views
30K
Back
Top