Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-04-19 09:03:42



Reply to topic  [ 25 posts ]  Go to page 1, 2, 3  Next
Memory Usage Safety Check 
Author Message

Joined: 2011-12-04 15:00:58
Posts: 22
Reply with quote
That new "Memory Usage Safety Check" doesn't work properly on Windows XP it seems.
It's complaining about too little virtual memory while my virtual memory got minimum 4 and maximum 8 GB and only 1.8 are used. Even physical memory still had over a GB free.
Also once it starts to reduce draw distance it doesn't seem to want to stop until at the minimum.

I'm just going to turn it off now and go back to a fine working viewer, unless i can help with some kind of logs?


2011-12-19 19:34:40
Profile

Joined: 2009-03-17 18:42:51
Posts: 5546
Reply with quote
Even if you got a 64bits operating system with 8Gb memory, the viewer is a 32bits application and can use a maximum of 4Gb of "high mem". Since 32bits operating systems can't use more than 3Gb of high mem in each program, I capped the usage to 3Gb (be aware that the OS might report a lower figure, but this is because it only counts part of the actually used high mem and not the address space (with all the holes in it that are due to memory fragmentation)). On a 64bits OS you may lower the MainMemorySafetyMargin debug setting to 0 (the viewer will then use a little over 3Gb of virtual space: 3.3Gb or so). I might implement another setting in the next version for 64bits OSes...

You may of course also disable the memory safety checks (the toggle is in the Advanced menu), but will then suffer from crashes as soon as the 4Gb high mem address space gets filled up to the brim...


2011-12-19 22:57:09
Profile WWW

Joined: 2011-12-04 15:00:58
Posts: 22
Reply with quote
Ok my bad, didn't really understand how virtual memory works.
Without that check it does indeed crash, didn't notice that before or on other viewers. Also am on 32 bits XP so that extra setting wouldn't really help in my case.

How about discarding stuff that's further away from the camera when low on memory and then later reload it from the cache instead of the current measures?
Until then i guess i'll keep my camera where it belongs :)


2011-12-20 13:30:43
Profile

Joined: 2009-03-17 18:42:51
Posts: 5546
Reply with quote
Raish wrote:
Ok my bad, didn't really understand how virtual memory works.
Without that check it does indeed crash, didn't notice that before or on other viewers.
All viewers are affected... Mesh viewers however are more prone to hit the addressable memory limit since they use about 20% more memory than non-mesh viewers.

Quote:
Also am on 32 bits XP so that extra setting wouldn't really help in my case.
You get me confused there... You said you had 8Gb ?... 32bits Windows can't see/use more than 3Gb. 32bits Linux can use more than 3Gb when the kernel has been compiled with PAE (Physical Address Extension) support and any 64bits OS can use any amount of RAM you throw it at.

Quote:
How about discarding stuff that's further away from the camera when low on memory and then later reload it from the cache instead of the current measures?
This is exactly what the current algorithm does: it first increases the "discard bias" (the higher the "discard" value of a texture, the less it uses RAM and the blurrier it appears: the discard bias is added to the "normal" discard value), meaning that textures which importance to the camera (a value computed by the viewer: out of camera field textures got 0.0 importance while closeup textures got a 1.0 importance) is low get discarded first. Only when this step is not enough to prevent too high a memory usage does the algorithm resorts to decreasing the draw distance (which again results in farther objects and textures to get discarded). Then if the above two measures are still not enough, the algorithm resets your camera to its default position and warns you about a possible crash.

Note that for the next release, I also made it so that 32bits and 64bits OSes are automatically coped with (with 3Gb or 4Gb limits respectively).


2011-12-20 18:51:42
Profile WWW

Joined: 2011-12-04 15:00:58
Posts: 22
Reply with quote
Henri Beauchamp wrote:
Quote:
Also am on 32 bits XP so that extra setting wouldn't really help in my case.
You get me confused there... You said you had 8Gb ?... 32bits Windows can't see/use more than 3Gb. 32bits Linux can use more than 3Gb when the kernel has been compiled with PAE (Physical Address Extension) support and any 64bits OS can use any amount of RAM you throw it at.


I got 4 GB physical RAM installed of which my OS uses only the 3.3 GB. When i said i had 8 GB virtual memory i actually meant my pagefile is 4-8 GB, which only helps to make space to ensure Cool VL gets all of the 3.3 GB.

Probably the 20% extra memory usage pushed it over the limit for me or i used to have lower graphic settings, have to experiment a bit.

I managed to get the out of memory message while standing still and loading everything within maximum draw distance so i guess it really isn't bad handling of memory when caming like i thought :)
However i noticed after the draw distance got reduced if i put it back up things are back immediately, so memory didn't really get freed up yet, which also would explain why it every time keeps reducing draw distance to the minimum.


2011-12-21 08:44:33
Profile

Joined: 2011-07-27 13:02:35
Posts: 78
Location: Ukraine
Reply with quote
Nice feature. Thanks for information on how to turn it off :lol:

In my system (Athlon X2 4800+, XP SP3 32bit with 2GB memory) it warned that memory is low when i had 1,5 GB free :|


2011-12-22 08:43:03
Profile

Joined: 2009-03-17 18:42:51
Posts: 5546
Reply with quote
Raish wrote:
Henri Beauchamp wrote:
Quote:
Also am on 32 bits XP so that extra setting wouldn't really help in my case.
You get me confused there... You said you had 8Gb ?... 32bits Windows can't see/use more than 3Gb. 32bits Linux can use more than 3Gb when the kernel has been compiled with PAE (Physical Address Extension) support and any 64bits OS can use any amount of RAM you throw it at.


I got 4 GB physical RAM installed of which my OS uses only the 3.3 GB. When i said i had 8 GB virtual memory i actually meant my pagefile is 4-8 GB, which only helps to make space to ensure Cool VL gets all of the 3.3 GB.
The algorithm doesn't take into account any swap space (do you REALLY want to see your computer swapping while the viewer runs ?... It would cause a MASSIVE slow down !) but only actual physical high memory and the 3Gb limit (4Gb for next release when running on 64bits OSes), whichever is the smaller.

WebGearbox wrote:
In my system (Athlon X2 4800+, XP SP3 32bit with 2GB memory) it warned that memory is low when i had 1,5 GB free :|
What are you speaking about ?... You can't have 1.5Gb free on a 2Gb system while running the viewer (the OS alone is probably eating up a couple hundreds megabytes out of the 2Gb RAM, and so is the viewer even before you connect) !... I assume you too are speaking about swap space... See my reply to Raish above. I would also suggest you ask for 2Gb more RAM to Santa, because with only 2Gb RAM your computer is hardly meeting the minimum requirements for any mesh viewer.


2011-12-22 08:55:47
Profile WWW

Joined: 2011-07-27 13:02:35
Posts: 78
Location: Ukraine
Reply with quote
Quote:
You can't have 1.5Gb free on a 2Gb system while running the viewer

Uh, but I did O_o

Um, works fine with 2GB O_o
Even in meshy regions. Even in crowded places. And I dont visit WERY crowded places much :lol:
Actually thats one of "why i use Cool VL"-s : it works much faster than everything else.

Also I don't actually want to install 7even, or XP64 cuz some software dont run propertly on them and its kinda own preference, i kinda got used to XP.. Actually i used Windows 98 till 2006 :D

Well, actually, I think I should ass up and go to the computer store (it's cross the road) for one more ram bar, since you say XP supports that.

Thanks for the idea.


2011-12-22 10:21:03
Profile

Joined: 2009-03-17 18:42:51
Posts: 5546
Reply with quote
WebGearbox wrote:
Quote:
You can't have 1.5Gb free on a 2Gb system while running the viewer

Uh, but I did O_o
Nope, that's simply impossible... This 1.5Gb figure you cite must include the swap space...


2011-12-22 10:29:13
Profile WWW

Joined: 2011-12-04 15:00:58
Posts: 22
Reply with quote
Henri Beauchamp wrote:
WebGearbox wrote:
Quote:
You can't have 1.5Gb free on a 2Gb system while running the viewer

Uh, but I did O_o
Nope, that's simply impossible... This 1.5Gb figure you cite must include the swap space...


It does in a way. I watched my system work with its memory while running Cool VL. It is swaping parts of Cool VL's memory into the pagefile even while it's active and on top. None the less WebGearbox's system actually used only 0.5 GB of it's physical memory.

Here are the values of memory usage of Cool VL on my system. All of them are only physical memory usage, so it's: (actual memory need) - (what's swaped out into the pagefile).
105 MB -- not connected
378 MB -- draw distance 144m in fairly crowded place (so no problem with 2 GB RAM)
740 MB -- max draw distance while standing still (reduced graphics a bit .. no error anymore)
888 MB -- max dd, caming - Memory Usage Safety Check kicks in and reduces draw distance. Memory usage decreases by about 10 MB then stays the same.(!)
1570 MB - had to try hard to get it as high with my new settings, not only caming avatars, but all over the 512m. But this is when it finally crashed. The pagefile had about 2 GB of Cool VL at the time, so it makes for over 3.3 GB total and had to crash.

That pretty huge gap between Safety check measures and actual problem is going to make me turn it off.

Henri Beauchamp wrote:
do you REALLY want to see your computer swapping while the viewer runs ?... It would cause a MASSIVE slow down !

I'd rather have a slow down instead of a crash or a view distance of max 100m. Also its running smoothly, don't really notice problems with the swaping.


2011-12-22 12:48:08
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 25 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 37 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.