[vox-tech] Need X Windows performance monitoring help

Eric Nelson vox-tech@lists.lugod.org
Thu, 15 Aug 2002 21:54:36 -0700


On Thursday 15 August 2002 21:19, Peter Jay Salzman wrote:
> eric,
>
> begin Eric Nelson <en77@attbi.com>
>
> > We are developing an embedded system which uses Java and X
> > Windows. It doesn't have a VGA.
>
> embedded and java seems like an oxymoron to me.   :)

I agree, but that's what the guys closest to the purse strings want.
>
> > When we run some code on a desktop with lots of ram and vga, we
> > get pretty good performance, but on our embedded system,
> > performance is poor.
> >
> > There are several factors which may contribute to this problem:
> > swapping of the libraries or X Server itself,latency in the X
> > Server, processor speed, Java, the video driver, etc.  So maybe
> > we need more ram, or a faster video driver, or to lock X into
> > ram, or simply go to a faster clock.
> >
> > My question is, how can we time stamp events,
>
> what do you mean by "time stamp"?  depending on what you mean, i
> would either recommend using the "time" command or the "top"
> command.

What I mean is,=20
request to show image -> Xserver 10:43:42.234
Xserver sends commands to hardware 10:43:42.678
image shows 10:43:43.012
etc. =20
In the time from start to finish, where are the hangups.  In other=20
words, do we need to improve the graphics adapter, the Xserver, add=20
ram, what?

We can film the screen, and see how much time things take there, but=20
where are other delays?=20
>
> > or get a trace of memory
>
> i'm not exactly sure what a memory trace is, either.   but if it
> helps, take a look at /proc/meminfo and see if that shows what you
> want.
>
meminfo and ps have good data, but you would like to see what they=20
say, each, say 10 milliseconds. =20

Taking the analytical approach, we can put hooks in the code, say=20
toggle a bit on the parallel port, and watch w/ a logic analyzer,=20
but, whew, what a job.  I was hoping to get some type of strace w/=20
time stamps.

The kind of ironic thing is that, w/ 8 bit processors, a good analyzer=20
will do all these things.  Now, with the complexity of modern OS's,=20
it's almost like going back to the very early days of microprocessor=20
development, as far as tools go.  Like, printk is about the most=20
powerful tool out there :~)

> if that's not what you want, take a look at top.
>
> > and swap usage,
>
> ok, that i know.   try:
>
>    cat /proc/swaps
>
> to get how much swap is being used.  if you want to know what
> processes have been swaped to disk, it's good old "ps".  see "man
> ps" and do a search on "swap".

I read somewhere that maybe the libraries swap out.  How can I tell?
>
> i saw rod's reply.  as usual, he makes total sense.  :)

Yes, often the empirical approach is easiest, and since you are=20
measuring what you want to measure, and not some artificial=20
byproduct, it's more accurate.  And, you get the quickest results. =20
We vary ram, clock speed, maybe even different graphics adapters. =20
I'm pretty sure that's the best, most direct approach.

Thanks.

>
> pete