Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29283 Discussions

What is BLOCKSIZE and how does it affect performance of IO operations?

Hashemi__Ali
Beginner
1,427 Views

The manual only says "The BLOCKSIZE specifier indicates the physical I/O transfer size in bytes for the file."
Does it actually have to do anything with the block size of the physical storage? 

How would BLOCKSIZE affect the buffered and non-buffered IO performance? 

I appreciate if someone can provide a few examples that changing BLOCKSIZE will affect the performance (for better or worse).

 
0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
1,427 Views

BLOCKSIZE determines how the run-time library "chunks" I/O operations. For non-buffered I/O, it primarily affects large transfers - whether it's fewer, larger transfers or more smaller ones. Generally larger transfers are more efficient. There's no relationship to the physical storage.

Buffering is where the library defers physical I/O operations, collecting more data from the I/O operation. The library tries to be "smart" about this but it can't always pick the optimal strategy.

The reason the controls are there is that applications vary, and you may need to experiment to see what works best for you.

View solution in original post

0 Kudos
1 Reply
Steve_Lionel
Honored Contributor III
1,428 Views

BLOCKSIZE determines how the run-time library "chunks" I/O operations. For non-buffered I/O, it primarily affects large transfers - whether it's fewer, larger transfers or more smaller ones. Generally larger transfers are more efficient. There's no relationship to the physical storage.

Buffering is where the library defers physical I/O operations, collecting more data from the I/O operation. The library tries to be "smart" about this but it can't always pick the optimal strategy.

The reason the controls are there is that applications vary, and you may need to experiment to see what works best for you.

0 Kudos
Reply