Re: RFR: JDK-8299336 - InputStream::DEFAULT_BUFFER_SIZE should be 16384

2023-01-04 Thread Markus KARG
On Fri, 23 Dec 2022 22:28:34 GMT, Markus KARG wrote: > I/O had always been much slower than CPU and memory access, and thanks to > physical constraints, always will be. > While CPUs can get shrinked more and more, and can hold more and more memory > cache on or nearby a CPU core, the distance

Re: RFR: JDK-8299336 - InputStream::DEFAULT_BUFFER_SIZE should be 16384

2023-01-03 Thread Alan Bateman
On Fri, 23 Dec 2022 22:28:34 GMT, Markus KARG wrote: > I/O had always been much slower than CPU and memory access, and thanks to > physical constraints, always will be. > While CPUs can get shrinked more and more, and can hold more and more memory > cache on or nearby a CPU core, the distance

Re: RFR: JDK-8299336 - InputStream::DEFAULT_BUFFER_SIZE should be 16384

2023-01-02 Thread Markus KARG
On Mon, 2 Jan 2023 10:03:02 GMT, Peter Levart wrote: > Here, the benefit of increasing buffer from 8k to 16k gets from about 10% > (doing IO) up to 20% (reading from cache) increase in performance. I think 10% to 20% is good enough as an argument to go with 16k instead of 8k. -

Re: RFR: JDK-8299336 - InputStream::DEFAULT_BUFFER_SIZE should be 16384

2023-01-02 Thread Peter Levart
On Fri, 23 Dec 2022 22:28:34 GMT, Markus KARG wrote: > I/O had always been much slower than CPU and memory access, and thanks to > physical constraints, always will be. > While CPUs can get shrinked more and more, and can hold more and more memory > cache on or nearby a CPU core, the distance

Re: RFR: JDK-8299336 - InputStream::DEFAULT_BUFFER_SIZE should be 16384

2023-01-01 Thread Peter Levart
On Fri, 23 Dec 2022 22:28:34 GMT, Markus KARG wrote: > I/O had always been much slower than CPU and memory access, and thanks to > physical constraints, always will be. > While CPUs can get shrinked more and more, and can hold more and more memory > cache on or nearby a CPU core, the distance

Re: RFR: JDK-8299336 - InputStream::DEFAULT_BUFFER_SIZE should be 16384

2022-12-27 Thread Markus KARG
On Tue, 27 Dec 2022 14:55:31 GMT, Peter Levart wrote: > Hello Markus! Could you show the JMH code that produced the benchmark results? The following lines make use of a custom method I have added to `InputStream` in a custom build of JDK 21, so JMH can control the size of the buffer. The test

Re: RFR: JDK-8299336 - InputStream::DEFAULT_BUFFER_SIZE should be 16384

2022-12-27 Thread Peter Levart
On Fri, 23 Dec 2022 22:28:34 GMT, Markus KARG wrote: > I/O had always been much slower than CPU and memory access, and thanks to > physical constraints, always will be. > While CPUs can get shrinked more and more, and can hold more and more memory > cache on or nearby a CPU core, the distance

Re: RFR: JDK-8299336 - InputStream::DEFAULT_BUFFER_SIZE should be 16384

2022-12-24 Thread Johannes Lichtenberger
I'm also looking forward to io_uring support on Linux kernels which support it and the Windows equivalent :-) The first one should come with one of the project Loom updates sometime. Kind regards Johannes Markus KARG schrieb am Sa., 24. Dez. 2022, 10:11: > I/O had always been much slower than

RFR: JDK-8299336 - InputStream::DEFAULT_BUFFER_SIZE should be 16384

2022-12-24 Thread Markus KARG
I/O had always been much slower than CPU and memory access, and thanks to physical constraints, always will be. While CPUs can get shrinked more and more, and can hold more and more memory cache on or nearby a CPU core, the distance between CPU core and I/O device cannot get reduced much: It