replace maxRowsInMemory with BufferSize