On Wed, Nov 22, 2017 at 8:01 AM, Waldek Kozaczuk <jwkozac...@gmail.com> wrote:
> I managed to implement my change to make msf_read() use device strategy > routing directly to bulk read however many blocks at once the uio parameter > to mfs_read() specifies and as expected now the java run takes ~ 850 ms > (down from 3500-4500ms). Which means it still spends ~600 ms reading ~ 14MB > of data. > > So in general my thinking was correct. > Excellent! Another quick hack you could try without diving too deep into the paging code is to have msf_read() read 4*4096 bytes (or whatever) when asked for just 4096 bytes, and save the unrequested bytes in a memory buffer and next time msf_read() is called if it's asking for the next page, we already have it waiting in the buffer and can copy (unfortunately) from it instead of starting another read. If it will not be the byte wanted, we wasted this read-ahead and drop the buffer. Of course it's not a general and good cache like ZFS (it's also not a *cache* at all, if the same page is read multiple times with read() we read it again...) but might be good enough for improving boot time. Nadav. -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to osv-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.