top isn't actually a very accurate way of profiling memory usage. The
numbers you have shown so far can easily be explained by memory
fragmentation and the fact that glibc allocates memory in pools.
Smaller memory fragments are not returned to the operating system but
are being kept for reuse in the application. Please run your script a
lot more often and see if there's a significant increase in memory.
Sven
Jared Whiting [EMAIL PROTECTED] wrote:
This script gets run 5000 times in a loop, and it's the only script
accessing the gimp instance.
...I'm not sure
how significant the increase is as I have to run the script quite a
bit,
but this is what I see after running several loops and using top after
each loop:
Start up:
VIRT RES SHR S %CPU %MEM TIME+ COMMAND
17632 7448 13m S 0.0 1.4 0:01.14 gimp
Loop 1:
VIRT RES SHR S %CPU %MEM TIME+ COMMAND
21088 11m 13m S 0.0 2.2 11:45.59 gimp
Loop 2:
VIRT RES SHR S %CPU %MEM TIME+ COMMAND
25544 14m 13m S 0.0 2.9 23:28.40 gimp
Loop 3:
VIRT RES SHR S %CPU %MEM TIME+ COMMAND
27796 17m 13m S 0.0 3.5 35:11.54 gimp
Loop 4:
VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31408 21m 13m S 0.0 4.2 46:54.84 gimp
Loop 5:
VIRT RES SHR S %CPU %MEM TIME+ COMMAND
35220 24m 13m S 0.0 4.8 58:35.12 gimp
Loop 6:
VIRT RES SHR S %CPU %MEM TIME+ COMMAND
38108 27m 13m S 0.0 5.5 70:11.92 gimp
Loop 7:
VIRT RES SHR S %CPU %MEM TIME+ COMMAND
42292 31m 13m S 0.0 6.2 81:51.41 gimp
Thanks,
Jared
Is there any more information I can provide regarding my test script and
the memory increase I observe with GIMP? Following your advice I ran my
script more often, but I'm not sure if my response was what you were
looking for. If I run a script that creates a new image with six text
layers in a loop it results in about a 3000k increase in the amount of
memory the GIMP process is holding on to for each 5000 times the script
gets executed (as observed using top). There is only a single instance
of the script being executed at any time.
This behavior is similar to what I have observed in our more complicated
script we use where small but permanent memory increases occur over
time. I am open to the idea that there is no memory leak and that it's
a problem with my script or that I'm providing unreliable/inadequate
info regarding the issue so let me know if that's still the case.
I mainly am looking for enough insight so I don't have to rely on having
to restart GIMP for our image generation scripts unless it's absolutely
necessary.
Thanks,
Jared
___
Gimp-developer mailing list
Gimp-developer@lists.xcf.berkeley.edu
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer