News & Rumours: Playstation 4/ Orbis *spin*

Status
Not open for further replies.
In a virtual memory system isn´t the hard disk virtual memory bigger than the physical memory space managed by the same virtual memory system?.

If so the logical would be 4.5 GB of direct memory + 512 MB physical memory of virtual system + 1024 MB of HD virtual system.

This would also fit with claims of some games using 6 GB of memory in PS4.


That seems to be off by 512mb. I thought it was 4.5GB real ram and 1024MB of virtual ram where half of that is mapped to real memory and half is mapped to HDD paged memory. Where did you get this extra 512MB from?
 
That seems to be off by 512mb. I thought it was 4.5GB real ram and 1024MB of virtual ram where half of that is mapped to real memory and half is mapped to HDD paged memory. Where did you get this extra 512MB from?

What I don't get is why bother with the OS handling virtual memory at all unless at some point a game might not have it? Aren't developers smart enough to move stuff into and out of memory from the HDD on their own?
 
That seems to be off by 512mb. I thought it was 4.5GB real ram and 1024MB of virtual ram where half of that is mapped to real memory and half is mapped to HDD paged memory. Where did you get this extra 512MB from?

What I don't understand is, why limit the paged memory to 512MB? I'd like to ask, other than the interpretation of the flexible memory by Digital Foundry, where does this 512 MB come from?

What I don't get is why bother with the OS handling virtual memory at all unless at some point a game might not have it? Aren't developers smart enough to move stuff into and out of memory from the HDD on their own?

I too think console specific developers would not use the OS handled Vmem, but this could make life easier for PC devs, no?
 
What I don't understand is, why limit the paged memory to 512MB? I'd like to ask, other than the interpretation of the flexible memory by Digital Foundry, where does this 512 MB come from?



I too think console specific developers would not use the OS handled Vmem, but this could make life easier for PC devs, no?

What major PC devs have never worked on a console by this point? The 360 already caused that transition and they never had virtual memory. The PS3 is the first system that could use anything resembling virtual memory since all systems had a hard drive, who knows if developers actually did?
 
What major PC devs have never worked on a console by this point? The 360 already caused that transition and they never had virtual memory. The PS3 is the first system that could use anything resembling virtual memory since all systems had a hard drive, who knows if developers actually did?

I was mainly thinking of Indie devs. They'd be more used to OS handling the memory for them, so it'd be easier for them to port their games over if they kept the memory handling similar to that of PC OS's.
 
I get the feeling that the 512MB of VM was always there. It's probably been earmarked as the cache for all the OS supported features such as crossplay and recording gameplay etc. Only now it's been supplemented by the extra 512MB of real memory.
 
That seems to be off by 512mb. I thought it was 4.5GB real ram and 1024MB of virtual ram where half of that is mapped to real memory and half is mapped to HDD paged memory. Where did you get this extra 512MB from?

By reading this about how freeBSD virtual memory works:
http://www.thehackademy.net/madchat/ebooks/Mem_virtuelle/freebsd_vm.html
I reach the conclussion that you replicate in the HD paged memory what you have in the physical memory (managed by the virtual system) and possible variations of the content of that memory.When certain conditions are given the physical mem is filled with one or another content of the paged memory.So if you have 512MB of physical mem replicated in 512MB of paged memory what do you want a virtual mem system for if you are never going to change the physical mem content?.

Example: you are in level 2 of a game.You have paged mem of level 1 and 3 and physical virtual mem stores level 1 as you can go back to that level.As you approach further level 3 virtual memory system would load level 3 in physical virtual memory to avoid loads time.
 
What's being said is there is 1024 MB of virtual memory that is paged in and out of a 512MB real memory window.

In reality, the game would only ever have 4.5 GB + 512MB of data in physical ram while it has the remainder of the virtual memory (another 512MB of data) paged out to the hard drive. It would be disingenuous to say the game is using more than 5 GB of physical memory.

Assume a game has 2 levels, each one sized to be 512MB.

The game loads Level 1 and Level 2 to virtual memory. The gamer is playing in Level 1, so that the set of data is moved from hdd to physical ram.

Real RAM: Level 1
HDD RAM: Level 1, Level 2

Now the gamer progresses to level 2, so the set of level 2 data is moved from hdd to physical ram. At that point then level 1 data is flushed from physical ram to the hdd.

Real RAM: Level 2
HDD RAM: Level 1, Level 2
 
What's being said is there is 1024 MB of virtual memory that is paged in and out of a 512MB real memory window.
Hopefully without putting my foot in my mouth, it's worth noting that VM size in FreeBSD terms isn't the same thing as a swap file in Windows terms. You can have a VM size in the 100s of gigabytes without ever paging to disk on BSD systems.

BSD sorts its memory into Wired, Active, Inactive, and Free. I've no idea how Sony is using these terms, but Direct Memory might be the maximum amount that is ever 'wired' (unpageable) with Flexible Memory being used for the rest. It might be segmented simply to ease memory management and increase virtual addressing space. It doesn't mean that half be physical memory and half be a pagefile on disk.

I don't pretend to be an expert but iOS doesn't even support swap files and still manages fine with just 1gb of RAM. And it still virtualizes its memory.
 
I was mainly thinking of Indie devs. They'd be more used to OS handling the memory for them, so it'd be easier for them to port their games over if they kept the memory handling similar to that of PC OS's.

What indie game port is using so much RAM that 4.5GB of non-virtual memory isn't enough?
 
That came up on my google search, i just wondered if there were anyone else or if they (Square) made a special deal with Microsoft?

no idea , I just played that one for a short period of time.

I remember them specificly saying that xbox live wasn't required for subscription games. I think just very few subscription games came to the platform
 
How about in-app purchases? I am sure the store app will fall under trustzone as well as logging in to PSN in game. No need to hold memory for those functions.

When you open up the store, trustzone commandeers 512 Mb of ram and returns it to the game once you purchased your armor or new gun.

I imagine trustzone expands its memory footprint as needed and uses flexible memory as a way to facilitate it as seamlessly as possible.
 
Last edited by a moderator:
I thought the final set up was 4.5GB (real) directly managed the game 512MB (real) managed by the OS and then 512MB (virt) also managed by the OS.

So in total the available memory for games is 5.5GB with just the OS managed section being split.

I was just talking about physical memory.

You don't have to use the full 1024 MB of virtual memory (and page to HDD) unless you want to.
 
The level-loading example is not a particularly interesting use of the FreeBSD VM system.
The VM manager doesn't delve into the contents of what it is paging, so it's not going to predict that the pages that belong to Level 2 can start streaming in as the pages that belonged to the shut-off portion of Level 1 are dumped. It's going to start swapping when there's a page fault, which is too late for a smooth experience. The writing about FreeBSD's system indicates repeated faults are an accepted part of the VM's training process.
Streaming in a level can be started sooner and more efficiently if the game engine detects it will be needed soon, with no guesswork on the part of the OS.

The VM handling might be interesting if it's tasked with the sorts of things it was created for, like irregularly-sized allocations and process forking, which leads to copy, integrity, and fragmentation handling that can become a mess if a smaller developer tries rolling its own.
What neat features does Sony think devs want to partake in from the paged section?
The flexible memory might serve as a managed middle ground between the game and services on the OS side of the system. It may also be something that Sony has more flexibility to tweak or expand if it starts releasing some of the system reserve.
 
What indie game port is using so much RAM that 4.5GB of non-virtual memory isn't enough?

As I understood, flexible mem is for easy management of memory (and I don't think that it is limited to 512MB of paged ram, btw, my bet is on the DF misunderstood Sony's response, which didn't talk about numbers) by the OS. We don't know what type of games Indies will come up that may require more than 4.5GB a couple of years down the road, and you can't put a cap on how much mem Indie's would like, and maybe this will make life easier for them, to let them not worry about memory management the same way a console dev would.

Like BRiT brought up, the Witness uses more than 4.5, and that is because Johnathan Blow wanted a brute force approach, to be able to hold all stuff in memory at once. I'm sure he can come up with streaming (and I think his game would really benefit from PRT), but still, he currently loads everything to RAM. Not a typical console approach.
 
People seem to be mixing the concepts of virtual memory and paging up.

All the memory is virtual, except maybe for some kernel allocated bounce buffers for IO.

And I'd be very surprised if any of the new consoles would use paging. Paging even a small percentage of the main memory in and out to HDD is going to take a significant amount of time.

Cheers
 
One explanation of why thuway and co might be getting it wrong on the reservation is because devs can use the system in a mode where 6 GB of physical memory is available to the game.

This is only for development purposes though, you can't release a game that uses 6 GB.
 
Status
Not open for further replies.
Back
Top