Comment 11 for bug 1093385

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

>>We always access InnoDB files in the same mode as the server. So if
>>neither server nor XB use O_DIRECT, POSIX_FADV_DONTNEED may (again, up
>>to specific implementation) indeed stomp on server’s caches. I don’t see
>>a way around it, but as Sergei pointed out, there shouldn’t be much
>>impact on InnoDB neither. If both the server and XB use O_DIRECT, then I
>>don’t see how using POSIX_FADV_DONTNEED may be bad.

Yes, if the mode of access is same as that server and is ensured,
then it should be fine. So, unless, someone uses O_DIRECT with
PXB and non-O_DIRECT with InnoDB (or something like ALL_O_DIRECT
with one but not with another), and yes, using fadvise when doing
buffered I/O is quite desirable to reduce dirty page pressure.

> If both the server and XB use O_DIRECT, then I
> don’t see how using POSIX_FADV_DONTNEED may be bad.

Shouldn't be bad (since invalidation of the mapping is not a
function of file size).