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
I found write perform very poorly compared to read.
I modified MemoryFS such that MemoryFile' read() and write() basically do nothing:
`
private int read(Pointer buffer, long size, long offset) {
int bytesToRead = (int) Math.min(filesize - offset, size);
return bytesToRead;
}
private int write(Pointer buffer, long bufSize, long writeOffset) {
int maxWriteIndex = (int) (writeOffset + bufSize);
if (maxWriteIndex > filesize)
filesize = maxWriteIndex;
return (int) bufSize;
}
`
The benchmark workload executed is simply sequently write and then read a single file. The throughput for read/write are
2000MB/s and 300MB/s. I tried various block sizes and the gap persists.
The text was updated successfully, but these errors were encountered:
I tested the same read/write stub routine on juse-jna, the result shows their throughput are nearly the equal.
I compile the code with openjdk8. And the jvm the code run on are openjdk8 and openjdk16, the big gap exists on both platforms.
I found write perform very poorly compared to read.
I modified MemoryFS such that MemoryFile' read() and write() basically do nothing:
`
private int read(Pointer buffer, long size, long offset) {
int bytesToRead = (int) Math.min(filesize - offset, size);
return bytesToRead;
}
private int write(Pointer buffer, long bufSize, long writeOffset) {
int maxWriteIndex = (int) (writeOffset + bufSize);
if (maxWriteIndex > filesize)
filesize = maxWriteIndex;
return (int) bufSize;
}
`
The benchmark workload executed is simply sequently write and then read a single file. The throughput for read/write are
2000MB/s and 300MB/s. I tried various block sizes and the gap persists.
The text was updated successfully, but these errors were encountered: