Author Topic: CS/PS/CEL + google-perftools  (Read 1166 times)

loux

  • Hydlaa Citizen
  • *
  • Posts: 222
    • View Profile
CS/PS/CEL + google-perftools
« on: July 20, 2007, 03:15:06 pm »
Hello,
i'm trying to see if using tcmalloc (google perftools) instead of ptmalloc, will give me some improvement,
CS 26890 (which is CS 26888 + dmalloc.c Xordan fix + walkcmd.cpp bug fix) CEL 2766 and PS 0.3.019-r1
first i need a kind of benchmark, all i can do is a little walktest script (with chemin.rec in /tmp folder):
<-
loadrec chemin
play
->
then walktest -exec=/this/script (script and walktest in the same folder)
i will output something like : End demo: 18.549000 secs to render 1960 frames: 105.666074 fps
so every one will have exaclty the same path render
now i need to make it once with ptmalloc (default) and once with ptmalloc disable and tcmalloc enable (USE += tcmalloc) which disable PTMALLOC

and i'll output benchmark

ptmalloc give me : 18.549000 secs to render 1960 frames: 105.666074 fps
tcmalloc give me : 18.269000 secs to render 1960 frames: 107.285566 fps
see you soon

there are no diff between the two at the level but maybe walktest don't lots of memory, i think i need another bench, maybe celstart ?
loux

---------------------

> valgrind --tool=massif psclient.sh :
==15718==
==15718== Total spacetime:   3,049,803,430 ms.B
==15718== heap:              83.9%
==15718== heap admin:         9.4%
==15718== stack(s):           6.6%

« Last Edit: July 21, 2007, 12:34:29 pm by loux »

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: CS/PS/CEL + google-perftools
« Reply #1 on: July 20, 2007, 03:28:51 pm »
Remember to check memory usage too.

loux

  • Hydlaa Citizen
  • *
  • Posts: 222
    • View Profile
Re: CS/PS/CEL + google-perftools
« Reply #2 on: July 20, 2007, 03:37:48 pm »
what do you mean "memory usage" how many memory it use ? how to do so i live, i mean while running walktest script ?
thanks to take some time to read me Xordan
loux

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: CS/PS/CEL + google-perftools
« Reply #3 on: July 20, 2007, 06:27:24 pm »
Well, you could run PS instead of a script, then monitor it after loading some maps.
Or you could just look at ram usage while the script is running, then take a rough estimate. There's various apps for linux which show you this info.
« Last Edit: July 20, 2007, 06:30:55 pm by Xordan »

loux

  • Hydlaa Citizen
  • *
  • Posts: 222
    • View Profile
Re: CS/PS/CEL + google-perftools
« Reply #4 on: July 20, 2007, 06:51:32 pm »
Xordan,
i don't think memory usage (i mean size of it) is interesting to watch, i think PS need some memory whatever the allocator we use,
it's more about speed of allocation when allocating chunk of it,
so i need some kind of PS benchmark for it :)
see you
loux

loux

  • Hydlaa Citizen
  • *
  • Posts: 222
    • View Profile
Re: CS/PS/CEL + google-perftools
« Reply #5 on: July 20, 2007, 07:00:07 pm »
that's my time (it'll be better to load ps 100 times to make an average) :
Map wtower loaded successfully in 584ms
Map hyarena loaded successfully in 155ms
Map hyjayose loaded successfully in 95ms
Map hybdr loaded successfully in 234ms
Map hysewers loaded successfully in 130ms

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: CS/PS/CEL + google-perftools
« Reply #6 on: July 20, 2007, 07:05:46 pm »
tcmalloc is known to use more memory than ptmalloc, so it is interesting to watch. If tcmalloc is 5% faster but uses 20% more ram, then it's no good.

loux

  • Hydlaa Citizen
  • *
  • Posts: 222
    • View Profile
Re: CS/PS/CEL + google-perftools
« Reply #7 on: July 20, 2007, 07:22:55 pm »
ok good point
+1 Xordan,
i'll try to watch that too
loux