How do you optimize the disk IO when you cannot assume a file will start at a boundary then?

Поиск
Список
Период
Сортировка
От Siddharth Jain
Тема How do you optimize the disk IO when you cannot assume a file will start at a boundary then?
Дата
Msg-id CAPqV3pSfV-ALnjH1o9Ha8m8D0x72Koat+7KcXCSjk_p-1e6L1g@mail.gmail.com
обсуждение исходный текст
Ответы Re: How do you optimize the disk IO when you cannot assume a file will start at a boundary then?
Re: How do you optimize the disk IO when you cannot assume a file will start at a boundary then?
Список pgsql-general
Hi All,

I understand the storage layer in databases goes to great lengths to ensure:
- a row does not cross a block boundary
- read/writes/allocation happen in units of blocks
etc. The motivation is that at the OS level, it reads and writes pages (blocks), not individual bytes. I am only concerned about SSDs but I think the principle applies to HDD as well.

but how can we do all this when we are not even guaranteed that the beginning of a file will be aligned with a block boundary? refer this.

Further, I don't see any APIs exposing I/O operations in terms of blocks. All File I/O APIs I see expose a file as a randomly accessible contiguous byte buffer. Would it not have been easier if there were APIs that exposed I/O operations in terms of blocks?

can someone explain this to me?

Sid

В списке pgsql-general по дате отправления:

Предыдущее
От: Nandhini Jayakumar
Дата:
Сообщение: Discover PostgreSQL's Graph Power with Apache AGE!
Следующее
От: Sasmit Utkarsh
Дата:
Сообщение: Postgresql assistance needed