Stress and Stats.

New Message Reply Date view Thread view Subject view Author view

Jay Gischer (gischer++at++knex.engr.sgi.com)
Mon, 31 Aug 1998 12:13:01 -0700 (PDT)


Steve Baker writes:
>
>
> Hi!
>
> This is kindof urgent - so if there is a pfPerson listening, I'd
> appreciate a quick answer.
>
> I recently turned on Stress management on a system that didn't
> previously use it and was suprised to find that pfChanStressFilter
> was only effective when I had enabled stats gathering.
>
> Imagine my frustration:
>
> USER: Steve - your stress code doesn't work.
> STEVE: Hmm - I'll turn on statistics and see what's happening.
> ...See - stress works just fine.
> USER: No it doesn't.
> STEVE: Yes it does...look how the polygon count stays roughly
> constant...it says so right here in the stats....
> (ad nausiam)
>
> If I use something like:
>
> pfFrameStats *fsp = pfGetChanFStats ( chan ) ;
> pfFStatsAttr ( fsp, PFFSTATS_UPDATE_FRAMES, 60 ) ;
> pfFStatsClass ( fsp, PFSTATS_ENGFX, PFSTATS_SET ) ;
>
> ...stress functions nicely.
>
> But if I do this:
>
> pfFrameStats *fsp = pfGetChanFStats ( chan ) ;
> pfFStatsClass ( fsp, PFSTATS_ALL, PFSTATS_OFF ) ;
>
> ...then stress management seems to be disabled.
>
> ...I can find no mention in the man pages that pfChanStressFilter
> requires stats gathering to be enabled - although I could perhaps
> understand why Performer might need that to be done in order to
> measure the stress.
>
> So, my questions are:
>
> 1) Am I dreaming or is this really true?
>
No, you aren't dreaming. The interface to stats is the same
internally and externally, so that if you tell it to turn off all
stats-gathering it believes you, even if that hoses stress management.

> 2) Is this considered a bug or just a documentation drop-off?

My opinion is that it's a documentation drop-off.

>
> 3) Since stats collection (presumably) takes time, what is the
> most efficient/minimum required stats collection modes for
> stress management to work properly. Maybe PFSTATS_ENGFX
> is overkill.
>
Yes, I think it is. Performer uses both
PFFSTATS_ENPFTIMES (mode PFSTATS_ALL) and
PFSTATSHW_ENGFXPIPE_TIMES (mode PFSTATSHW_GFXPIPE_TIMES_TOTAL)
Probably it can cope only using the former, since HW stats aren't
available on every platform, however, it's not going to be as
accurate, since in that mode it can't differentiate between geometry
and fill limitations. These modes are turned on by default when you
create a channel.

> 4) Since I normally set the pfFStatsAttr to average stats over 60
> frames (1 second), am I also causing the stress management
> filters to see stress levels over a 1 second window instead of
> reacting immediately?
>
I've been unable to find any indication in the source that this
attribute has any influence over stress management. As far as I can
tell, stress calculations are based on the elapsed time in the
previous frame only.

As far as I can see, this attribute only influences the rate at which
the CPU stats are gathered and over what period stats are averaged.
But the average stats don't appear to be used by stress management.

That would suggest that you could set this to zero and never do any
accumulation at all, which would probably suit you just fine. The
code isn't completely clear, and I'd prefer to get Sharon's
confirmation on this, but it's an easy enough experiment to perform, I
suppose.

Performer sets the update interval by default to 2 seconds.

> 5) If it's a bug, is there a better work-around than turning stats
> collection on?
>
It's not a bug. Stats are what drives LOD/DVR; there aren't any
"private" stats that are used to drive stress management. The best thing to do
programatically is to operate on the current stats config (turn off
everything except X and Y), rather than setting it absolutely. (turn
off everything.

It is an issue with documentation.

------------------------------------------------------------------------
Jay L Gischer + "I see great things in baseball. It's our game.
Silicon Graphics + It will repair our losses and be a blessing to us."
(650) 390-4277 + -Walt Whitman
gischer++at++sgi.com +
                     + "A life has no meaning except in the impact it
                     + has on other lives"
                     + -Jackie Robinson


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 31 1998 - 12:13:07 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.