Chunk Size Vs Page Size

  • Chunk Size: how many items to process before moving to the next()
    • For example if chunk size is 3:
      • we do read for 3 items, and then write for 3 items, and then read for 3 items, ...
  • Page size: how many items to to read (in JPA or something) in the current reader process

Example

  1. If page size < chunk size: for example, pagesize = 5, and chunk size is 20, we have the following:

    1. Read (5)
    2. Read (5)
    3. Read (5)
    4. Read (5)
    5. Write (20)
  2. If chunk size < page size: for example, pagesize = 20, chunk size = 5 we have the following:

    1. Read (20)
    2. Write (5)
    3. Write (5)
    4. Write (5)
    5. Write (5)
  3. If chunk size == page size: for example, page size = 3, chunk size = 3 we have the following:

    1. Read (3)
    2. Write (3)
    3. Read (3)
    4. Write (3)