Subject RE: [firebird-support] MON$ Table & Tracing Was: FB Memory Use
Author Alan McDonald
> > What benefit, exactly, do you expect someone to get from a 'glimpse'
> at
> > the MON tables?
>
> We use it to track down the queries/operations which are occurring when
> users complain about slow performance.
>
> We also use it when we need to kill a run-away query.
>
>
> > I really would not know how to interpret these 8 snapshots.
>
> IMO the 8 snapshots have little value; they only show you what was
> running at the exact moment of the snapshot not 1 milli-second before
> or after.
>
> As such, while the snapshot shows the current operations there are
> plenty of operations which could now be idle which were killing the
> system 1 ms before the snapshot.
>
>
> To properly understand the slow system operations, the TRACE
> functionality is required.
>
> We have used it to log long running SQL statements (starting with
> longer than 60 seconds and then progressively decrease the time value
> to 5 secs). This allowed us to find some really bad queries and
> significantly improve their performance.
>
> Taken to an extreme, it would be possible to log all activity and then
> use those details to develop an operational profile of a client/system
> over a series of days.
>
> From this profile, a further analysis of the statements which need
> optimization could be developed, sometimes it is not the long running
> operations that have the most significant performance impact. The
> optimization of a statement which currently executes in 4sec to execute
> in 1sec but is executed 1000 times a day could be more significant than
> the optimization of a 60 sec SP, which executes 10 times a day, to 5
> secs.
>
>
> Sean
OK, but you have not convinced me that periods of close analysis (i.e.
frequent polling of the MON tables) should be labelled "an abuse of the
system". Any more than a user's desire to frequently fill and empty normal
tables with 1ks of records for whatever design or production use
requirements they might have. It might be a strange thing to do in my view
but it's not an "abuse".
I would not intend to do this in production on a permanent basis - in fact I
don't have the time to do it full time. But for a period of a few hours
especially after a major application upgrade, the information provided is
clear and traceable (at least in Sinatica Monitor). And after only a short
period of observing this data I can say that it will be indispensible part
of my system maintenance regime.
Alan