From: | Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | wait events for disk I/O |
Date: | 2017-01-30 13:01:03 |
Message-ID: | CAGPqQf0LsYHXREPAZqYGVkDqHSyjf=KsD=k0GTVPAuzyThh-VQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi All,
Attached is the patch, which extend the existing wait event infrastructure
to
implement the wait events for the disk I/O. Basically pg_stat_activity's
wait
event information to show data about disk I/O as well as IPC primitives.
Implementation details:
- Added PG_WAIT_IO to pgstat.h and a new enum WaitEventIO
- Added a wait_event_info argument to FileRead, FileWrite, FilePrefetch,
FileWriteback, FileSync, and FileTruncate. Set this wait event just before
performing the file system operation and clear it just after.
- Pass down an appropriate wait event from caller of any of those
functions.
- Also set and clear a wait event around standalone calls to read(),
write(), fsync() in other parts of the system.
- Added documentation for all newly added wait event.
Open issue:
- Might missed few standalone calls to read(), write(), etc which need
to pass the wait_event_info.
Thanks to my colleague Robert Haas for his help in design.
Please let me know your thought, and thanks for reading.
Thanks,
Rushabh Lathia
www.EnterpriseDB.com
Attachment | Content-Type | Size |
---|---|---|
wait_event_disk_IO.patch | binary/octet-stream | 67.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2017-01-30 13:43:48 | Re: Superowners |
Previous Message | Haribabu Kommi | 2017-01-30 12:51:06 | Re: pg_hba_file_settings view patch |