Skip to content

Lance random take performace #3981

Description

@pengzhiwei2018

I have do some test on the lance random take on local ssd disk, I test take 1000 rows one by one and take 1000 row at once, the performance has 40x differ, I suspect it related to the the scheduler cost between io and decode. Anyone have some suggestion about this? thanks.

main test code is here:

const test_cnt: u32 = 100;
let idx_vec = gen_random_ids(1000);
let batch_size = 1; 
let start_ts = std::time::Instant::now();
for i in 0..test_cnt {
   let chunnks = idx_vec.chunks(batch_size);
   for idx_chunk in chunnks {
     let mut ids = Vec::from(idx_chunk);
     let mut read_stream = lance_reader.take(ids).await;
    
     while let Some(batch_r) = read_stream.next().await {
       let batch = batch_r.unwrap();
     }
  }
 }
 let end_ts = std::time::Instant::now();
 println!("random read time: {:?}", (end_ts - start_ts) / test_cnt);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions