You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Evaluate the use of different file reading apis: iostreams, fread or SO dependant read. iostreams and fread are buffered, which means that data (more data than that requested) is copied into an intermediate buffer, just in case successive calls to fread need that data. This is intended to speed up the case of reading small portions of data sequentially. This is not our case, where we read chunks of page size, typically 64KB, so we are paying an extra cost here when copying into the intermediate buffer
Disk access coalescing: This is more complicated to implement, but tries to solve the following problem. When multiple threads request for pages, (for instance, in a parallel scan), the order at which these threads make the page requests can be not sequential. For instance, eventhough we might be conceptually scanning the pages in order (e.g. 0,1,2,3...) the threads could reach the file storage system in a different order, which would translate into a page access sequence like 1,4,2,3,7,6 .... This basically destroys the performance. Thus for this optimization the file storage could be more like a service, where a single and independent thread processes de read requests with high priority, with a queue of pending requests. Before reading the next page, it could inspect such queue and coalesce the accesses. For instance, if the queue contained 4,2,3,6, it could read a full chunck from 2 to 6 in a single call.
The text was updated successfully, but these errors were encountered:
Evaluate the use of different file reading apis: iostreams, fread or SO dependant read. iostreams and fread are buffered, which means that data (more data than that requested) is copied into an intermediate buffer, just in case successive calls to fread need that data. This is intended to speed up the case of reading small portions of data sequentially. This is not our case, where we read chunks of page size, typically 64KB, so we are paying an extra cost here when copying into the intermediate buffer
Disk access coalescing: This is more complicated to implement, but tries to solve the following problem. When multiple threads request for pages, (for instance, in a parallel scan), the order at which these threads make the page requests can be not sequential. For instance, eventhough we might be conceptually scanning the pages in order (e.g. 0,1,2,3...) the threads could reach the file storage system in a different order, which would translate into a page access sequence like 1,4,2,3,7,6 .... This basically destroys the performance. Thus for this optimization the file storage could be more like a service, where a single and independent thread processes de read requests with high priority, with a queue of pending requests. Before reading the next page, it could inspect such queue and coalesce the accesses. For instance, if the queue contained 4,2,3,6, it could read a full chunck from 2 to 6 in a single call.
The text was updated successfully, but these errors were encountered: