Memory usage, not sure

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
lazerblade
Posts: 194
Joined: Thu Mar 18, 2010 3:31 am
Contact:

Memory usage, not sure

Post by lazerblade »

I don't know if this is a bug or not, but it's the same for SVN rev 3591 and 1.7.2.

It seems that Irrlicht applications are taking a much larger amount of memory than they ought too.

Image

(Image was here, but picturestack seems to be fluctuating)

Really? 10 MB of system RAM for a custom scene node example? It's not that bad for this example, but it's much worse on other systems I've tested which have less dedicated VRAM. It get's worse the more you do naturally.

Is this a bug, or should the applications really be taking up that much RAM?
LazerBlade

When your mind is racing, make sure it's not racing in a circle.

3d game engine: http://sites.google.com/site/lazerbladegames/home/ray3d
lazerBlade blog: http://lazerbladegames.blogspot.com/
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I guess most of the stuff is debug symbols etc. The VRAM should be approx. 3-4 MB, though. Even for this resolution. But I'm still not sure, which parts of the VRAM the process manager shows, and which things are just rough approximations of the task manager. Better use a different way to measure RAM usage.
lazerblade
Posts: 194
Joined: Thu Mar 18, 2010 3:31 am
Contact:

Post by lazerblade »

I'm not sure what other ways there are, and I haven't found anything via Google yet. How should I be measuring RAM usage?
LazerBlade

When your mind is racing, make sure it's not racing in a circle.

3d game engine: http://sites.google.com/site/lazerbladegames/home/ray3d
lazerBlade blog: http://lazerbladegames.blogspot.com/
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

lazerblade,

Try next:

add break points:
#1 just when main() started
#2 just after createDevice()
#3 just after device->drop()
on each break point record the memory value in Task Manager.

if at #1 you have big value, then this is debug symbols.
lazerblade
Posts: 194
Joined: Thu Mar 18, 2010 3:31 am
Contact:

Post by lazerblade »

These are rounded approximations of the task manager's data.

For the breakpoint at main, my project takes up 2 MB. After createDeviceEx, it's 18 MB. This is before I load any data or add any scene nodes or anything. Up to 22 MB after all of the data/scene nodes are added. And back down to 18 MB *after* device->drop.

Weird huh? After the usage jumped at createdevice, I was sure it should drop again after I drop the device.
LazerBlade

When your mind is racing, make sure it's not racing in a circle.

3d game engine: http://sites.google.com/site/lazerbladegames/home/ray3d
lazerBlade blog: http://lazerbladegames.blogspot.com/
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

The dll is loaded at first usage, which is probably the createDevice call (as there are no other public interfaces basically).
lazerblade
Posts: 194
Joined: Thu Mar 18, 2010 3:31 am
Contact:

Post by lazerblade »

So if the DLL is what's taking up the bulk of it, am I and the examples using the debug DLL or what?
LazerBlade

When your mind is racing, make sure it's not racing in a circle.

3d game engine: http://sites.google.com/site/lazerbladegames/home/ray3d
lazerBlade blog: http://lazerbladegames.blogspot.com/
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

If you recompile Irrlicht, it's by default the debug dll. Don't know which ones you have first on your search path. Could be with, could be without symbols.
But it's also still unclear which numbers are taken into account. Does the number represent the VMEM used, some kind of "desktop aggregation" due to the application running as windowed app, or some other ressources as well? Maybe it's just as high because you have a screen resolution of 2Megapixel?! Just make sure that you really care about numbers that matter.
lazerblade
Posts: 194
Joined: Thu Mar 18, 2010 3:31 am
Contact:

Post by lazerblade »

I have no idea what the "memory usage" indicates in the task manager, but I get the same results running fullscreen or windowed. My desktop is at 1280x1024, and the D610 was at 1024x768. So I doubt it's related to the resolution, my project detects the desktop screen resolution and then sets itself the same. I'll look at the DLL's. Although it would be strange if the examples used debug?

BTW, I'm just using the nightly builds. I think they come with debug and non-debug in separately named DLL's.
LazerBlade

When your mind is racing, make sure it's not racing in a circle.

3d game engine: http://sites.google.com/site/lazerbladegames/home/ray3d
lazerBlade blog: http://lazerbladegames.blogspot.com/
lazerblade
Posts: 194
Joined: Thu Mar 18, 2010 3:31 am
Contact:

Post by lazerblade »

Okay, I've made 100% sure that it's not debug. After more testing, I learned this to be the same with 1.7.1 and also to affect RedRobot, which takes up more than a Gig of RAM.

So either this isn't a bug, or it's been a bug for a long time.


I think I'll turn this into a feature request. ;)
I would like to see a version of Irrlicht that optimizes the handling of resources to the point where it has a much smaller memory footprint.


I'm still interested in any advice/suggestions anyone has.

Thanks! :D
LazerBlade

When your mind is racing, make sure it's not racing in a circle.

3d game engine: http://sites.google.com/site/lazerbladegames/home/ray3d
lazerBlade blog: http://lazerbladegames.blogspot.com/
Post Reply