Re: Charging for Informix usage
Posted in 2000
You seem to be implying that individual users have their own databases. If
that is the case, some sort of usage stats would be quite simple to
determine. Make sure that TBLSPACE_STATS is set to 1 (the default) in your
onconfig file(s). Then, on a periodic basis, retrieve database-level
metrics from sysmaster:sysptprof using a statement that goes something like
this :
select TODAY , dbsname, sum(lockreqs), sum(lockwts), sum(deadlks),
sum(lktouts),
sum(isreads), sum(iswrites), sum(isrewrites), sum(isdeletes),
sum(bufreads),
sum(bufwrites), sum(seqscans), sum(pagreads), sum(pagwrites)
from sysptprof
group by 1, dbsname;
Better still, dump the results of this statement into a "Usage" table.
Your reporting SQL would read from this table and apply some sort of
weightages to each statistic. Remember to intialize stats after every
extraction (onstat -z).
If a database is shared by multiple users, you could decide to charge the
owner (i.e creator) of individual tables. In which case, the SQL above
would need to be joined to the systables of the database in question to
retrieve the "owner" column. For example,
database <whatever>;
select owner, today , dbsname, sum(lockreqs), sum(lockwts), sum(deadlks),
sum(lktouts),
sum(isreads), sum(iswrites), sum(isrewrites), sum(isdeletes),
sum(bufreads),
sum(bufwrites), sum(seqscans), sum(pagreads), sum(pagwrites)
from sysmaster:sysptprof a, systables b
where a.tabname = b.tabname
group by 1, 2, 3;
Personally, I would turn your costing philosophy on its head, splitting
the costs equally among all the departments that have access to the
computer, then giving a proportional DISCOUNT to the heavy users.
Rudy
Vic Goldberg wrote:
> Folks --
>
> I work at a university, where, for all sorts of arcane reasons, we
> need to charge back users for usage of the database. We need to make
> this reflect our actual costs as much as possible, without going to huge
> effort to get the information. The obvious, easy, metric is the amount
> of disk space that a user is consuming. This would skew the costs
> (probably unfairly) towards a large database vs. a small one, even if
> the small one is much more active.
>
> Does anyone have any suggestions for ways to get information that
> would allow me to charge multiple independant users seperately? I don't
> need the accounting side, just getting the metrics. One thought is to
> set up seperate instances, and track usage for each one, but that would
> be less efficient than a single instance with multiple databases.
>
> Thoughts? TIA!
>
> Vic
>
> ----
> Vic Goldberg
> Assistant Director, Data Operations, CIT
> Cornell University
> (607) 254-7441 (Voice) (607) 255-6982 (Fax)
> "Do not argue with Dragons,
> for you are crunchy and taste good dipped in ketchup. "