TA3D 0.5.0 TEST 3 Memory Usage - 100 MB per AI?

You have tested TA3D, share your experience /
Vous avez testé TA3D, venez partager votre expérience
Post Reply
User avatar
chkno
Posts: 9
Joined: Fri Jun 20, 2008 11:49 pm
Location: USA

TA3D 0.5.0 TEST 3 Memory Usage - 100 MB per AI?

Post by chkno » Sat Jun 21, 2008 12:24 am

Is it normal for adding AI players to skirmishes to use 100MB additional memory each?

Example data, from Full Moon, TA3D 0.5.0 TEST 3, GNU/Linux, 1gb ram 1.5gb swap, restarting ta3d between measurements, keeping everything the same but the number of AI opponents. Measurement taken just after the game starts (loading complete).

Image


I can't add the 9th AI that would fill up the player list because the oom-killer kills ta3d before the game starts.

Memory usage over the course of gameplay is fairly constant -- no additional surprises.
Last edited by chkno on Fri Jun 27, 2008 3:03 am, edited 1 time in total.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun Jun 22, 2008 7:58 pm

:shock: that's not normal at all !! I usually have TA3D taking 400Mb RAM on a 64bits Linux with optimizations turned off and with full debugging info ! I know that enabling optimization increases memory requirements it shouldn't increase that by 50% !

TA3D uses lots of textures, for each model it creates a texture for each player color (which is responsible for the memory use increase each time you add a player). Can you give us details about the way you built the TA3D (or if you used a prebuilt binary), and about your system (mainly video hardware/drivers) ?
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Mon Jun 23, 2008 6:15 pm

:shock: :shock: :shock: :shock: :shock: :shock:

User avatar
chkno
Posts: 9
Joined: Fri Jun 20, 2008 11:49 pm
Location: USA

Post by chkno » Mon Jun 23, 2008 7:11 pm

zuzuf wrote:Can you give us details about the way you built the TA3D (or if you used a prebuilt binary), and about your system (mainly video hardware/drivers) ?
I built TA3D from source ( ./configure ; make ; ./ta3d install /mnt/cdrom/ ). I fed it the TA and TACC discs, but not the third disc it prompted for.

While running, ta3d emits lots of these messages:
[driAllocateTexture:636] unable to allocate texture

and on exiting it emits "tried to join a dead thread" four times.

Hardware is a 32-bit x86 Intel Centrino Duo processor w/ Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03).

Versions of interacting software:
gcc (GCC) 4.1.2 20070214 ( (gdc 0.24, using dmd 1.020)) (Gentoo 4.1.2 p1.1)
allegro-4.2.2-r1 , allegrogl-0.4.3 , fmod-4.11.03 , xorg-server-1.3.0.0-r5 , linux-2.6.22.1-ck1

Full glxinfo: http://chkno.net/glxinfo

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Mon Jun 23, 2008 9:11 pm

ok it seems you have a problem with textures. The messages about threads are normal but the texture errors are not. TA3D needs texture memory and can use some texture extensions as well if present, but since we haven't tested it on hardware that doesn't support those extensions it may not work the way we expected :? . It's possible your driver puts everything in system memory without using the proper texture format :roll: . I've seen it doesn't support non power of two textures and this will greatly increase video memory use.

But I am still struck by your results, I've run some tests with and without optimizations parameters: with 9 AI players ta3d takes 300Mb of RAM (600Mb virtual) in both cases (the difference is small ~30Mb) !

I'll see that next week end when I'll have time.
=>;-D Penguin Powered

User avatar
Corsaire
Posts: 68
Joined: Sun Feb 25, 2007 6:44 pm

Post by Corsaire » Tue Jun 24, 2008 7:55 am

zuzuf, don't forget one thing :

video is an integrated Intel 945 video card, so the central memory is also the memory used for video.
So you've got memory taken by the game and the AI + memory for the graphics wich is normaly in the video card if you've got a NVidia or a ATI.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Tue Jun 24, 2008 8:03 am

Yes I know that, and since texture compression and non power of two textures aren't supported, textures take lots of RAM. But I didn't know it would be seen as memory used by the TA3D process. It'll be even worse when we'll have our HD textures ... we'll have to add some options about textures (size, mipmaps, etc...)
=>;-D Penguin Powered

User avatar
chkno
Posts: 9
Joined: Fri Jun 20, 2008 11:49 pm
Location: USA

Post by chkno » Tue Jun 24, 2008 6:02 pm

zuzuf wrote:Yes I know that, and since texture compression and non power of two textures aren't supported, textures take lots of RAM. But I didn't know it would be seen as memory used by the TA3D process.
I didn't either, but this might explain why I couldn't find all that used memory by looking at calls to malloc/free and new/delete.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Thu Jun 26, 2008 9:26 am

I tried to reduce memory consumption while developing some parts of the engine (even if we can do better than that it's already not too bad). For example I've rewritten a list class because I needed a small memory footprint (std::list is too big :( sometimes )
=>;-D Penguin Powered

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests