Original Post
Hi everyone,
I have some questions regarding fast disk reading on a Windows server. A lot of people who are working on MMO games or such that require a lot of data retrieval are probably using commercial database management systems. I'm interested however in retrieving large amounts of data using a custom format that would not fit well with a relational DBMS, therefore I want to roll my own high-speed data retrieval code.
The information that I'm most interested in is how a modern DBMS, such as SQL Server or Oracle, performs its I/O on the Windows platform nowadays. I studied databases fairly heavily in college and I was always taught that for the most efficient disk reading, you store your data in disk blocks in the order that it will be read (as least as far as you can manage) so that the blocks can be sequentially read with minimal seek / rotational delays, in parallel with the CPU processing of the blocks being read. The Windows file system does not guarantee that anything you write will be in nice blocks (because the actual disk block has NTFS information on top of your written data), or that it will even be in sequential order because the file blocks may be scattered all over the disk, even when they are written in sequence by the program. According to Wikipedia, "Database management systems often use their own block I/O for improved performance and recoverability as compared to layering the DBMS on top of a file system."
My question is, do modern Windows DBMS's perform direct block access, or do they go through the file system? Is direct I/O still beneficial in a multitasking operating system where several programs are all using the disk at once? Can it be performed without stepping all over the NTFS file system and corrupting data?
These may be tough questions, but I appreciate any guidance that can be provided. Thank you very much!
I have some questions regarding fast disk reading on a Windows server. A lot of people who are working on MMO games or such that require a lot of data retrieval are probably using commercial database management systems. I'm interested however in retrieving large amounts of data using a custom format that would not fit well with a relational DBMS, therefore I want to roll my own high-speed data retrieval code.
The information that I'm most interested in is how a modern DBMS, such as SQL Server or Oracle, performs its I/O on the Windows platform nowadays. I studied databases fairly heavily in college and I was always taught that for the most efficient disk reading, you store your data in disk blocks in the order that it will be read (as least as far as you can manage) so that the blocks can be sequentially read with minimal seek / rotational delays, in parallel with the CPU processing of the blocks being read. The Windows file system does not guarantee that anything you write will be in nice blocks (because the actual disk block has NTFS information on top of your written data), or that it will even be in sequential order because the file blocks may be scattered all over the disk, even when they are written in sequence by the program. According to Wikipedia, "Database management systems often use their own block I/O for improved performance and recoverability as compared to layering the DBMS on top of a file system."
My question is, do modern Windows DBMS's perform direct block access, or do they go through the file system? Is direct I/O still beneficial in a multitasking operating system where several programs are all using the disk at once? Can it be performed without stepping all over the NTFS file system and corrupting data?
These may be tough questions, but I appreciate any guidance that can be provided. Thank you very much!