Hi
I'm trying to get a reasonably accurate measurement of the size of
resident srahed and private memory a generic (gtk)dfb process needs.
I'm using 2.6.18 debian kernel, vesa fb @800x600x16, DFB 1.0 rc3 multicore.
I'm interested in getting separated shared and private RSS values as i'd
like to know how dfb scales when the number of concurrent processes
grows up.
Having read a lot of documentation, i come to the conclusion that the
linux smaps interface should offer the most accurate values, hence i'm
planning using something like
cat /proc/$PID/smaps|grep $WHAT | awk 'BEGIN{TOT=0}{TOT=TOT+$2}END{print
TOT" KB"}'
to get the two values i need, where WHAT is set in turn to Private_ and
Shared_.
This should also correctly address the fact that fusion allocates big
memory chunks, whose VSZ is hundred megs big, while their RSS is instead
much smaller (try using pmap, he'll report df_window using 8MB of
private memory).
Could you please comment on the mesurement methods i used?
I also noticed dfb, being rootless, wastes a lot of surface memory when
big windows are stacked one on top another, hence the need for a clever
wm that minimizes hidden windows: is this correct ?
In the case sawman, with a clever policy implementation, could address
this issue?
Attached tests show gtk-demo running alone, gtk-demo running togheter
with a small gtk app, df_window running with both the above.
Shared memory values include 1800KB for the framebuffer and also
something for unused video modules.
Looking at the test results, i would say that the minimal RSS for a very
simple gtkdfb app is slightly lower than 10MB, pheraps ~9MB
I'd highly apreciate someone of you commenting on the results i got.
thanks a lot
Attilio
/* Only gtk-demo (8078) running, measuring gtk-demo shared and private RSS */
PID=8078
[EMAIL PROTECTED]:~$ WHAT=Shared_
[EMAIL PROTECTED]:~$ cat /proc/$PID/smaps|grep $WHAT | awk
'BEGIN{TOT=0}{TOT=TOT+$2}END{print TOT}'
944 KB
[EMAIL PROTECTED]:~$ WHAT=Private_
[EMAIL PROTECTED]:~$ cat /proc/$PID/smaps|grep $WHAT | awk
'BEGIN{TOT=0}{TOT=TOT+$2}END{print TOT}'
9768 KB
/* launched a second, small, gtkdfb app (8094), measuring again gtk-demo shared
and private RSS */
PID=8078
[EMAIL PROTECTED]:~$ WHAT=Shared_
[EMAIL PROTECTED]:~$ cat /proc/$PID/smaps|grep $WHAT | awk
'BEGIN{TOT=0}{TOT=TOT+$2}END{print TOT}'
6960 KB
[EMAIL PROTECTED]:~$ WHAT=Private_
[EMAIL PROTECTED]:~$ cat /proc/$PID/smaps|grep $WHAT | awk
'BEGIN{TOT=0}{TOT=TOT+$2}END{print TOT}'
4176 KB ()
/* df_window also started (PID=8103), measuring its shared and private RSS */
[EMAIL PROTECTED]:~$ PID=8103
[EMAIL PROTECTED]:~$ WHAT=Shared_
[EMAIL PROTECTED]:~$ cat /proc/$PID/smaps|grep $WHAT | awk
'BEGIN{TOT=0}{TOT=TOT+$2}END{print TOT}'
4504 KB
[EMAIL PROTECTED]:~$ WHAT=Private_
[EMAIL PROTECTED]:~$ cat /proc/$PID/smaps|grep $WHAT | awk
'BEGIN{TOT=0}{TOT=TOT+$2}END{print TOT}'
1036 KB
/* meausring the simple gtkdfb app*/
[EMAIL PROTECTED]:~$ PID=8094
[EMAIL PROTECTED]:~$ WHAT=Shared_
[EMAIL PROTECTED]:~$ cat /proc/$PID/smaps|grep $WHAT | awk
'BEGIN{TOT=0}{TOT=TOT+$2}END{print TOT}'
7944 KB
[EMAIL PROTECTED]:~$ WHAT=Private_
[EMAIL PROTECTED]:~$ cat /proc/$PID/smaps|grep $WHAT | awk
'BEGIN{TOT=0}{TOT=TOT+$2}END{print TOT}'
1664 KB
_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users