Strange value on _TableStat-OsRead

Posted by claudemir_santos on 13-Apr-2017 11:31

I have a table that has a strange value in the _TableStat-OsRead field.

This table is stored on Area type 2 (128 rec/blk)

In the tabanalys:

PUB.prog_det                               66175    6.5M    99   107   103                66175    1.0     1.0

The values of _tablestat are:

_tablestat-read = 395
_tablestat-osread = 93,539

Why Os Read is larger read?

All Replies

Posted by Richard Banville on 13-Apr-2017 11:41

What release of OpenEdge are you running?

Did you run proutil -zerostats since the database was last started?

Did you change the base table value since the database was last started?

Posted by George Potemkin on 13-Apr-2017 11:43

Some utilities like dbanalys read all data blocks even if they do not store any records. For example, if a table has not any records (only a template one) then _tablestat-osread will increase by cluster size after dbanalys.

Posted by claudemir_santos on 13-Apr-2017 11:47

What release of OpenEdge are you running?

11.6.3 on Linux 64 bits

Did you run proutil -zerostats since the database was last started?

no

Did you change the base table value since the database was last started?

Not changes in this table

Posted by George Potemkin on 13-Apr-2017 12:00

find first any-table where recid(any-table) eq your-table-dbkey no-error.

I guess it will be counted as OS reads for "your-table" (not verified).

Posted by Richard Banville on 13-Apr-2017 12:30

Very true George.  A dbanalys or backup for example that only do block type operations will record osReads for the table in a type II area for block not in the -B and will not record records read statistics since after all it is doing block level access, not record level access.

Posted by Richard Banville on 13-Apr-2017 12:31

I believe find by recid/rowid will record record level read statistics though.

Posted by George Potemkin on 13-Apr-2017 12:38

Find in my example will generate zero record reads. So the question is: will it create non-zero block reads? Find will, of course, read a block with "your-table-dbkey" - no matter what is its block type or what object owns the block.

Posted by Richard Banville on 13-Apr-2017 12:46

If the recid.rowid is associated with the table requested, it will increment a record read stat.  If they do not match, then a read stat is not recorded.

If the block needed to satisfy the record read request is not in the -B and an O/S read is required to page it in to the -B, it will record an osRead activity statistic for the table associated with the block read, not necessarily the table requested since the recid/rowid may be associated with a different object in the same area..

Posted by George Potemkin on 13-Apr-2017 12:57

Table  prog_det uses 800+ blocks (= 6.5M / 8K if blocksize is 8K). It's 112 times less than _tablestat-osread. That is why I think the most of OS reads were created by the queries with zero record reads.

Posted by Richard Banville on 13-Apr-2017 13:01

Maybe but my bet would be on dbanalys or probkup.  Lets see what claudemir has to say about which is done more frequently.

Posted by claudemir_santos on 13-Apr-2017 14:13

Richard, backup online every day, dbanalys 1 x month.

This thread is closed