Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: Trying to correlate SHOW STATUS and SHOW INNODB STATUS

From: Vladimir Shebordaev <vladimir.shebordaev(at)gmail.com>
Date: Fri Sep 14 2007 - 18:34:50 EDT


Hi!

As I can see from grep output, os_n_pending_reads is defined and changed in /storage/innobase/os/os0file.c around and below line 1958 for mysql-5.1.23 and line 1944 for mysql-5.0.48 that I have handy. In either case that file is the only place where the variable is accessed for write.

As far as I could infer from the sources, it is some kind of completed synchronous filesystem read access counter in os_file_{p,}read*() portability wrappers. It is increased before every actual read()/pread() call (or whatever windoze has for read()/lseek() operations) under dedicated mutex held down and decreased upon the call is complete regardless of the results under the same mutex to ensure atomicity. Btw, that mutex is not acquired when the value is copied out to export_vars.

I'm not that familiar to Innobase code to judge whether it makes any sense :) I can just guess this value must be around the number of threads sleeping in synchronous read operations at the moment.

In the hope it helps.

Regards,
Vladimir

Baron Schwartz пишет:
> Hi,
>
> I'm trying to correlate some variables in SHOW INNODB STATUS to SHOW
> STATUS. (Please don't spend too much time on this question, it's not
> critical).
>
> In SHOW INNODB STATUS,
>
> ----------------------
> BUFFER POOL AND MEMORY
> ----------------------
> ...snip...
> Pending reads 0
>
> The "Pending reads" bit comes from buf_print_io() in buf0buf.c:
>
> fprintf(file,
> ... snip ...
> "Pending reads %lu\n"
> ... snip ...
> (ulong) buf_pool->n_pend_reads,
>
> So far so good. Then I look in srv_export_innodb_status() in srv0srv.c
> to see where the data for SHOW STATUS's Innodb_data_pending_reads comes
> from:
>
> export_vars.innodb_data_pending_reads= os_n_pending_reads;
>
> Looks like NOT the same data, but I quickly get lost trying to navigate
> the source and see. I suspect they are the same thing. Can anyone
> prove or disprove, again without spending too much time on it?
>
> Thanks
> Baron
>

-- 
MySQL Internals Mailing List
For list archives: 
http://lists.mysql.com/internals
To unsubscribe:    
http://lists.mysql.com/internals?unsub=lists@pantek.com
Received on Fri Sep 14 18:42:27 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 07:59:28 EDT

Do you need help?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library