Overcoming the 2GB RAM limitation

AmigaOS users can make feature requests in this forum.
User avatar
HKvalhe
Posts: 256
Joined: Mon Sep 03, 2012 9:39 am
Location: Bergen, Norway
Contact:

Overcoming the 2GB RAM limitation

Post by HKvalhe »

As known to us all. 2GB RAM is the maximum level of RAM AmigaOS4 actually supports.

Seeing that so many new Amiga programs are more power and memory hungry, it easily becomes a limitation in AmigaOS4 when working on many heavy operations at the same time.

It would be nice to see a kernel update to AmigaOS 4.1 Update 6 where this 2GB RAM limitation is broken, and your Amiga system can have unlimited level of RAM available to use in AmigaOS4.

Can this be done? Can a new kernel be implemented through AmiUpdate to overcome this limitation? It would be nice to see. Happy Easter everybody :)
Helge Kvalheim, Norway
AmigaOne 500 @ 1.15Ghz Samsung SSD 840 EVO 500GB, AmigaOS 4.1 Final, 2GB DDR2, Sapphire Radeon HD 6670 1GB GDDR5 PCI-E, ESI@Juli XTe PCIe audio
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: Overcoming the 2GB RAM limitation

Post by tonyw »

It can't be implemented simply by "fixing" and recompiling the kernel. It needs just about every system component to be modified and recompiled. The result is not likely to give a great improvement, since the 32-bit address space means that a program can't, EVER, address more than 4 GB of address space. When you leave out the permanently-assigned areas for CPU registers, I/O and so on, we are back to about 3 GB, and that's not much better than 2 GB.
cheers
tony
User avatar
HKvalhe
Posts: 256
Joined: Mon Sep 03, 2012 9:39 am
Location: Bergen, Norway
Contact:

Re: Overcoming the 2GB RAM limitation

Post by HKvalhe »

tonyw wrote:It can't be implemented simply by "fixing" and recompiling the kernel. It needs just about every system component to be modified and recompiled. The result is not likely to give a great improvement, since the 32-bit address space means that a program can't, EVER, address more than 4 GB of address space. When you leave out the permanently-assigned areas for CPU registers, I/O and so on, we are back to about 3 GB, and that's not much better than 2 GB.
Sounds more complicated than anticipiated. I suppose what you say here is that a complete rewrite of the kernel has to happen in order to make this possible, but i also suppose this is a thing that is being worked on for AmigaOS 4.2, along with multi-core support, if i am not mistaken.

That could probably explain why this is not possible to bring as a simple kernel update to AmigaOS 4.1 Update 6 through AmiUpdate. It seems far more complex than that.

Thanks for explaining, tonyw. Happy Easter :)
Helge Kvalheim, Norway
AmigaOne 500 @ 1.15Ghz Samsung SSD 840 EVO 500GB, AmigaOS 4.1 Final, 2GB DDR2, Sapphire Radeon HD 6670 1GB GDDR5 PCI-E, ESI@Juli XTe PCIe audio
Delshay
Posts: 21
Joined: Tue Nov 19, 2013 11:23 am

Re: Overcoming the 2GB RAM limitation

Post by Delshay »

reading non amiga forums some user(s) are using 2GB + 1GB = 3GB total if more than one memory slot is present.
User avatar
HKvalhe
Posts: 256
Joined: Mon Sep 03, 2012 9:39 am
Location: Bergen, Norway
Contact:

Re: Overcoming the 2GB RAM limitation

Post by HKvalhe »

Delshay wrote:reading non amiga forums some user(s) are using 2GB + 1GB = 3GB total if more than one memory slot is present.
I'm excited to see how they solve this memory barrier. At least it's a first step.
Helge Kvalheim, Norway
AmigaOne 500 @ 1.15Ghz Samsung SSD 840 EVO 500GB, AmigaOS 4.1 Final, 2GB DDR2, Sapphire Radeon HD 6670 1GB GDDR5 PCI-E, ESI@Juli XTe PCIe audio
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: Overcoming the 2GB RAM limitation

Post by tonyw »

@Delshay

Well, if you use Linux, obviously you are not limited by the AmigaOS API and structures. There are four slots on the board, and I think you can have up to 16 GB of RAM total.
cheers
tony
Delshay
Posts: 21
Joined: Tue Nov 19, 2013 11:23 am

Re: Overcoming the 2GB RAM limitation

Post by Delshay »

An extra 1GB of ram is a lot of memory and can make a difference.
Delshay
Posts: 21
Joined: Tue Nov 19, 2013 11:23 am

Re: Overcoming the 2GB RAM limitation

Post by Delshay »

HKvalhe wrote:As known to us all. 2GB RAM is the maximum level of RAM AmigaOS4 actually supports.

Seeing that so many new Amiga programs are more power and memory hungry, it easily becomes a limitation in AmigaOS4 when working on many heavy operations at the same time.
There is another way to improve performance other than adding memory but only the manufacture will know if its possible.

Note the rare memory module in thread.

http://amigaworld.net/modules/newbb/vie ... at&order=0
Deniil
Posts: 109
Joined: Mon Jul 11, 2011 6:59 pm

Re: Overcoming the 2GB RAM limitation

Post by Deniil »

tonyw wrote:It can't be implemented simply by "fixing" and recompiling the kernel. It needs just about every system component to be modified and recompiled. The result is not likely to give a great improvement, since the 32-bit address space means that a program can't, EVER, address more than 4 GB of address space. When you leave out the permanently-assigned areas for CPU registers, I/O and so on, we are back to about 3 GB, and that's not much better than 2 GB.
"Every system component to be modified and recompiled"?!? I don't believe that. Are you saying that all sources in AmigaOS use:

Code: Select all

LONG buf;
buf=AllocMem(n);
if(buf>0) {
  //ok
}
//or
if(buf<=0) fail();


Hardly. I know the code isn't that stupid since you've been working on it for over 10 years. And it doesn't matter if pointers are LONG (instead of ULONG) in a a lot of places as long as one only check for ==null or !=null.

Since you most likely have changed all AllocMem to AllocSysObject (or whatever it was) surely all those incorrect if's was changed as well. Just turn the switch to 4GB and be done with it!! 3,5GB is a lot better than 1,5GB which is what we have today. Isn't not 2GB->3GB as you suggested, it's 1,5GB->3,5GB which is a huge deal.
User avatar
colinw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 207
Joined: Mon Aug 15, 2011 9:20 am
Location: Brisbane, QLD. Australia.

Re: Overcoming the 2GB RAM limitation

Post by colinw »

Deniil wrote: ... And it doesn't matter if pointers are LONG (instead of ULONG) in a a lot of places as long as one only
check for ==null or !=null.
Unfortunately, other code is not always testing against NULL, a substantial portion of code does nutty pointer
math and that stuff usually breaks with signed variables when addresses are above 2 gig.
So, it's always a smart idea to use unsigned when dealing with addresses.

Besides that, it's now possible to have a 16gig ram disk (or larger) for anything using the ExtMem interface
and this will really test to see how fast you can shoot yourself in the foot.

http://wiki.amigaos.net/wiki/Exec_Extended_Memory
Post Reply