Analysis Zoo

Chunked Sized Transfer With Memory Advise

This transmit demonstrate the interaction between the sized chunked transfer and memory advise (via madvise(2)). This figure reflect features of linux operation system to deal with memory. Via madvise(2) the user can specify how memory is treated.

Currently linux support the following options:

  • NORMAL - default
  • RANDOM - this expect page access in random order
  • SEQUENTIAL - expect page access in sequential order (pages can aggressively read ahead)
  • WILLNEED - expect access in the near future (not so aggressively read ahead necessary)
  • DONTNEED - it is not expected to access pages in the near future

In the lower figure you see that paging advise SEQUENTIAL and WILLNEED had positive impact to the transfertime of our test-file (102400000 Byte).

chunked-size-mem-advise-thumb.png

Note that if the selected chunksize increase, the effect tends to zero. This is because you run into limits - it's impractical to readahead if you encounter harddisk, cpu or network limits.

The overall time increase by small sized chunks is founded in the function call overhead and some other causes too.

Examine the chunked-size-mem-advise.pl perlscript, to reproduce the same test and generate the upper graph.