[mnet-devel] fec memory usage measured (new! with memory-freeing feature!)
Zooko
zooko at zooko.com
Thu Jul 24 16:49:59 BST 2003
Yesterday I tested fecmodule's memory usage, then realized that I was using a
locally-hacked version of fecmodule which had all of its "free()" and
"DECREF()" calls commented out.
Those results were actually useful information, as it told us the total amount
of memory that fecmodule allocates throughout its life, and that amount was
reassuringly correct: not much more than 2 times the size of the file.
Here's today's edition, where I use the normal fecmodule.c from CVS, which
includes calls to "free()" and "DECREF()" on things that it is finished using.
This is for running fectest with a sharesize of 16 MB. The file sizes and
memory amounts are all in bytes. The memory is reported after all of the
packets have been generated and then freed, so the only memory that is still
in use is the mmap itself and some "overhead" stuff. The results are just
what we wanted to hear: as the file size increases, the memory usage gets
close to 1 times the size of the file, which means no significant memory leaks.
--Z
filesize shares mem usage mem per size
-------- ------ --------- ------------
4096 1 21327872 5207.000
8192 1 21331968 2604.000
16384 1 21340160 1302.500
32768 1 21356544 651.750
65536 1 21389312 326.375
131072 1 21454848 163.688
262144 1 21585920 82.344
524288 1 21848064 41.672
1048576 1 22372352 21.336
2097152 1 23420928 11.168
4194304 1 25518080 6.084
8388608 1 29708288 3.542
16777216 1 38100992 2.271
33554432 4 54878208 1.635
67108864 8 88428544 1.318
134217728 16 155537408 1.159
268435456 32 289759232 1.079
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
mnet-devel mailing list
mnet-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mnet-devel
More information about the Mnet-devel
mailing list