Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4953311

Buffer size in BufferedInputStream and BufferedOutputStream is too small

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b32
    • CPU:
      x86
    • OS:
      windows_nt

      Description

      In java.io package, BufferedInputStream uses a default buffer size of 2048 bytes, and BufferedOutputStream uses a default buffer size of 512 bytes. These buffer sizes are too small and they cause significant performance penalty to the system because of the extra reads and writes. The small buffer size also causes significant performance bottleneck in socket read/write on high speed network. This bug is on all platforms.

      Most OSes that we support uses a buffer size of 8192 (8K) bytes for their IO buffering, and this is also the buffer size used by Microsoft VM on Win32. We should change the default buffer size in these two classes to 8K.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mmcclosksunw Michael Mccloskey (Inactive)
              Reporter:
              stanleyh Stanley Ho (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: