Dear developers:
I have some suggestions on PostgreSQL's IO behavior. I am not sure my opinions are right. Many thanks for your time!
It is documented that :
Shall PostgreSQL consider making O_DIRECT configurable? In MySQL,
innodb_flush_method can change if use
O_DIRECT or not.
I made some benchmarking on O_DIRECT
of MySQL, and I find that sometimes, using
O_DIRECT may hurt performance.
Comparing the blue (buffered IO) and green (direct IO) lines, I find buffered IO is faster. So I think having such parameter in PostgreSQL is reasonable. On the other hand,
https://ibb.co/f1VsCC1
Furthermore, the results above are also related to IO API supported by OS. MySQL support synchronized IO and Linux
libaio . It seems
that PostgreSQL only supports synchronized IO, so shall we support more IO engines? like
io_uring which is very popular in recent years.
Thanks & best,
Haochen
|