Re: [PATCH 5.1] zread: read files in 4k chunks

2020-06-23 Thread L A Walsh
The 'stat(2)' system call returns an optimal i/o size for files since some files in addition to being on disks with a 4k sector size (making 128bytes a slow choice for reads, and a real slow choice for writes), also can be on a RAID with it's own optimal i/o size. I think the 'stat(1)' prog shows

Re: [PATCH 5.1] zread: read files in 4k chunks

2020-06-22 Thread Chet Ramey
On 6/22/20 4:16 PM, Ilkka Virta wrote: > On 22.6. 19.35, Chet Ramey wrote: >> On 6/22/20 1:53 AM, Jason A. Donenfeld wrote: >>> Currently a static sized buffer is used for reading files. At the moment >>> it is extremely small, making parsing of large files extremely slow. >>> Increase this to 4k

Re: [PATCH 5.1] zread: read files in 4k chunks

2020-06-22 Thread Jason A. Donenfeld
On Mon, Jun 22, 2020 at 2:16 PM Ilkka Virta wrote: > > On 22.6. 19.35, Chet Ramey wrote: > > On 6/22/20 1:53 AM, Jason A. Donenfeld wrote: > >> Currently a static sized buffer is used for reading files. At the moment > >> it is extremely small, making parsing of large files extremely slow. > >>

Re: [PATCH 5.1] zread: read files in 4k chunks

2020-06-22 Thread Ilkka Virta
On 22.6. 19.35, Chet Ramey wrote: On 6/22/20 1:53 AM, Jason A. Donenfeld wrote: Currently a static sized buffer is used for reading files. At the moment it is extremely small, making parsing of large files extremely slow. Increase this to 4k for improved performance. I bumped it up to 1024

Re: [PATCH 5.1] zread: read files in 4k chunks

2020-06-22 Thread Jason A. Donenfeld
Hi Chet, A little bit larger than 1024, I believe, so 2048 would be reasonable. However, consider taking this patch as-is with the 4096 page size. This will yield much better performance and have basically no drawbacks on any system. Another place lbuf should be increased is in zcatfd, by the

Re: [PATCH 5.1] zread: read files in 4k chunks

2020-06-22 Thread Chet Ramey
On 6/22/20 1:53 AM, Jason A. Donenfeld wrote: > Currently a static sized buffer is used for reading files. At the moment > it is extremely small, making parsing of large files extremely slow. > Increase this to 4k for improved performance. I bumped it up to 1024 initially for testing. > This

[PATCH 5.1] zread: read files in 4k chunks

2020-06-21 Thread Jason A. Donenfeld
Currently a static sized buffer is used for reading files. At the moment it is extremely small, making parsing of large files extremely slow. Increase this to 4k for improved performance. This also allows reading files like /dev/kmsg on Linux, which will error if the read buffer is too small.