Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Increasing memory. Will 64bit linux help?

Subject: Increasing memory. Will 64bit linux help?

From: Ben Irv

Date: 17 Dec, 2008 12:19:03

Message: 1 of 12

Hi,

I need to increase the virtual memory available to matlab significantly. I see that 32 bit operating have a process limit for each programme of 2Gb of ram.

I will first try and give matlab an extra 1Gb by using a 3Gb switch which increases the amount of virtual memory that programmes can acesss.

But I was wondering if using 64 bit linux might be a better idea. I am new to linux and 64 bit operating systems. If I installed 64bit Ubuntu, installed Wine (a programme that could run windows programmes) and then installed my windows version of matlab would I be able to have a much larger process limit? Or do I have to buy another special 64bit linux version of matlab?

Thanks

Ben

Subject: Increasing memory. Will 64bit linux help?

From: Gavrilo Bozovic

Date: 17 Dec, 2008 12:27:02

Message: 2 of 12

"Ben Irv" <i.benjamin@ymail.com> wrote in message <giaqnn$mok$1@fred.mathworks.com>...
> Hi,
>
> I need to increase the virtual memory available to matlab significantly. I see that 32 bit operating have a process limit for each programme of 2Gb of ram.
>
> I will first try and give matlab an extra 1Gb by using a 3Gb switch which increases the amount of virtual memory that programmes can acesss.
>
> But I was wondering if using 64 bit linux might be a better idea. I am new to linux and 64 bit operating systems. If I installed 64bit Ubuntu, installed Wine (a programme that could run windows programmes) and then installed my windows version of matlab would I be able to have a much larger process limit? Or do I have to buy another special 64bit linux version of matlab?
>
> Thanks
>
> Ben

Running a windows in a linux is a bad idea. If you switch to Linux, run Matlab in Linux.

Windows 32bits can access to 3Go of RAM, provided that you have 4 Go in your computer, and that you modify the boot.ini file (otherwise, 2Go are reserved for windows). By the way, I guess you mean RAM when speaking about virtual memory. Virtual memory is not RAM, check wikipedia for more info. You can allocate to Matalb virtually any amount of virtual memory, but it will be disk storage used as RAM, which will be VERY slow.

Now what exactly is your problem? Often, people have simulations that require a lot of computational power, although not a lot of RAM. In this situation, augmenting the RAM won't diminish the calculation time. Large amounts of RAM are especially required when running calculation on very large matrixes.

Subject: Increasing memory. Will 64bit linux help?

From: Malcolm Lidierth

Date: 17 Dec, 2008 12:39:02

Message: 3 of 12

It may be worth asking TMW about the licence. Single-user licences can be upgraded to all-platforms at no extra cost (I think).

Subject: Increasing memory. Will 64bit linux help?

From: Ben Irv

Date: 17 Dec, 2008 14:10:19

Message: 4 of 12

"Gavrilo Bozovic" <gavrilo.bozovic@helbling.ch> wrote in message <giar6m$t3p$1@fred.mathworks.com>...
> "Ben Irv" <i.benjamin@ymail.com> wrote in message <giaqnn$mok$1@fred.mathworks.com>...
>
> Running a windows in a linux is a bad idea. If you switch to Linux, run Matlab in Linux.
>
> Windows 32bits can access to 3Go of RAM, provided that you have 4 Go in your computer, and that you modify the boot.ini file (otherwise, 2Go are reserved for windows). By the way, I guess you mean RAM when speaking about virtual memory. Virtual memory is not RAM, check wikipedia for more info. You can allocate to Matalb virtually any amount of virtual memory, but it will be disk storage used as RAM, which will be VERY slow.
>
> Now what exactly is your problem? Often, people have simulations that require a lot of computational power, although not a lot of RAM. In this situation, augmenting the RAM won't diminish the calculation time. Large amounts of RAM are especially required when running calculation on very large matrixes.

Hi Gavrilo

Thanks for the information. I think you are probably right that it is a bad idea to try and run windows apps on linux.

I was talking about virtual memory. 32 bit operating systems limit the virtual memory for any application to 2 Gb which can my increased to 3 Gb. But unfortunatley that limit includes both RAM and page file memory. (see http://www.mathworks.com/support/tech-notes/1100/1107.html#_Toc170182654) " In particular, the processor limit is the maximum amount of virtual memory a single process (application) can address. On 32-bit systems this is the most important factor limiting data set size"

The reason I need so much RAM is that I'm working in image processing with (unfortunately) 512 by 512 by 150 arrays that are doubles.

regards
Ben

Subject: Increasing memory. Will 64bit linux help?

From: Ben Irv

Date: 17 Dec, 2008 14:12:02

Message: 5 of 12

"Malcolm Lidierth" <ku.ca.lck@htreidil.mloclam> wrote in message <giart6$9ng$1@fred.mathworks.com>...
> It may be worth asking TMW about the licence. Single-user licences can be upgraded to all-platforms at no extra cost (I think).


Thanks. I didn't think about this. I hope you're right.

Subject: Increasing memory. Will 64bit linux help?

From: Gavrilo Bozovic

Date: 17 Dec, 2008 14:24:02

Message: 6 of 12

"Ben Irv" <i.benjamin@ymail.com> wrote in message <gib18a$sqt$1@fred.mathworks.com>...
> "Gavrilo Bozovic" <gavrilo.bozovic@helbling.ch> wrote in message <giar6m$t3p$1@fred.mathworks.com>...
> > "Ben Irv" <i.benjamin@ymail.com> wrote in message <giaqnn$mok$1@fred.mathworks.com>...
> >
> > Running a windows in a linux is a bad idea. If you switch to Linux, run Matlab in Linux.
> >
> > Windows 32bits can access to 3Go of RAM, provided that you have 4 Go in your computer, and that you modify the boot.ini file (otherwise, 2Go are reserved for windows). By the way, I guess you mean RAM when speaking about virtual memory. Virtual memory is not RAM, check wikipedia for more info. You can allocate to Matalb virtually any amount of virtual memory, but it will be disk storage used as RAM, which will be VERY slow.
> >
> > Now what exactly is your problem? Often, people have simulations that require a lot of computational power, although not a lot of RAM. In this situation, augmenting the RAM won't diminish the calculation time. Large amounts of RAM are especially required when running calculation on very large matrixes.
>
> Hi Gavrilo
>
> Thanks for the information. I think you are probably right that it is a bad idea to try and run windows apps on linux.
>
> I was talking about virtual memory. 32 bit operating systems limit the virtual memory for any application to 2 Gb which can my increased to 3 Gb. But unfortunatley that limit includes both RAM and page file memory. (see http://www.mathworks.com/support/tech-notes/1100/1107.html#_Toc170182654) " In particular, the processor limit is the maximum amount of virtual memory a single process (application) can address. On 32-bit systems this is the most important factor limiting data set size"
>
> The reason I need so much RAM is that I'm working in image processing with (unfortunately) 512 by 512 by 150 arrays that are doubles.
>
> regards
> Ben

Okay, I didn't know that the virtual memory was also limited.

However, I'm still wondering why you require so much RAM. I'm personnally doing FEM simulations with over 1M degrees of freedom. This gives a jacobian matrix of 1M x 1M. I have 8 Go of RAM (on a 64bits windows XP), but the only time I used them all was when I tested the system to know what it would be capable of. I don't recall exactly the number of degrees of freedom I had to put to require virtual memory in addition to RAM, but it was huge.

I'm not saying here that your code isn't optimized, I may be missing something! ;)

Anyway, if you're on windows 32 bits now, I'd say the most straightforward to do would be to switch to windows 64 bits. It doesn't have these memory limitations, and you'll have less work to do than to change to a Linux platform.

Subject: Increasing memory. Will 64bit linux help?

From: Oliver Woodford

Date: 17 Dec, 2008 15:18:03

Message: 7 of 12

"Ben Irv" <i.benjamin@ymail.com> wrote:
> The reason I need so much RAM is that I'm working in image processing with (unfortunately) 512 by 512 by 150 arrays that are doubles.

Unless you are randomly accessing that array you might find memory mapping the data to be a suitable alternative. I guess you can memory map the intermediate & output arrays too. See:
www.mathworks.com/access/helpdesk/help/techdoc/matlab_prog/braidws-1.html
Also, does it really need to be doubles? Quantizing data and using a smaller data type can save lots of memory.

Otherwise, MATLAB in 64-bit Linux is definitely the way to go.

Subject: Increasing memory. Will 64bit linux help?

From: Matt

Date: 17 Dec, 2008 15:21:02

Message: 8 of 12


> The reason I need so much RAM is that I'm working in image processing with (unfortunately) 512 by 512 by 150 arrays that are doubles.
------------------------------------------------------------------------------------

I'm working with arrays of similar dimensions which are single floats and I still have problems in 32 bit windows.

64-bit windows has helped a lot.

I'm still curious, though, what the 3Gb switch can do for me on my 32-bit machine. Does it matter that I only have 2GB RAM assuming I'm willing to put up with the swapping?

Subject: Increasing memory. Will 64bit linux help?

From: Oliver Woodford

Date: 17 Dec, 2008 15:25:04

Message: 9 of 12

"Oliver Woodford" <o.j.woodford.98@cantab.net> wrote:
> Otherwise, MATLAB in 64-bit Linux is definitely the way to go.

Or 64-bit Windows, of course, as Gavrilo pointed out. You still require a different MATLAB installation for that though, as with Linux.

Subject: Increasing memory. Will 64bit linux help?

From: Walter Roberson

Date: 17 Dec, 2008 15:57:56

Message: 10 of 12

Malcolm Lidierth wrote:
> It may be worth asking TMW about the licence. Single-user licences can be upgraded to
> all-platforms at no extra cost (I think).

Yes, but (officially) only if the software is the current version.

A single-user "named user" license can be installed on up to four different machines
and used on any two of them simultaneously. The machines do not have to be the same
operating system.

--
.signature note: I am now avoiding replying to unclear or ambiguous postings.
Please review questions before posting them. Be specific. Use examples of what you mean,
of what you don't mean. Specify boundary conditions, and data classes and value
relationships -- what if we scrambled your data or used -Inf, NaN, or complex(rand,rand)?

Subject: Increasing memory. Will 64bit linux help?

From: Ben Irv

Date: 17 Dec, 2008 17:05:05

Message: 11 of 12

"Matt" <mjacobson.removethis@xorantech.com> wrote in message <gib5cu$393$1@fred.mathworks.com>...
> ----
>
> I'm working with arrays of similar dimensions which are single floats and I still have problems in 32 bit windows.
>
> 64-bit windows has helped a lot.
>
> I'm still curious, though, what the 3Gb switch can do for me on my 32-bit machine. Does it matter that I only have 2GB RAM assuming I'm willing to put up with the swapping?
>
>

This link has the details for setting up a 3Gb switch. http://www.mathworks.com/support/tech-notes/1100/1107.html#_Toc170182654. I haven't tried it yet as a think 64 bit will be better for me. But as long as your combined swop space and RAM is 4GB. Then you can assign 3Gb to the programme, and put up with swopping.

Subject: Increasing memory. Will 64bit linux help?

From: Ben Irv

Date: 20 Dec, 2008 12:27:02

Message: 12 of 12

Thanks to everyone for their help.

I contacted matlab and I have a designated computer licence which allows multiple versions of matlab to be installed as long as it is on the same computer.

So I installed x64 ubuntu with matlab and everything works perfectly.

I will still look at the code and see if maybe I can reduce the usage a bit by using singles instead of doubles etc.

Thanks

Ben

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us