Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: wrong default write batch size for run_tsbs #845

Merged
merged 2 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions analytic_engine/src/table/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,7 @@ fn compute_mutable_limit(
write_buffer_size: u32,
mutable_limit_write_buffer_size_ratio: f32,
) -> u32 {
assert!(
mutable_limit_write_buffer_size_ratio >= 0.0
&& mutable_limit_write_buffer_size_ratio <= 1.0
);
assert!((0.0..=1.0).contains(&mutable_limit_write_buffer_size_ratio));

let limit = write_buffer_size as f32 * mutable_limit_write_buffer_size_ratio;
// This is safe because the limit won't be larger than the write_buffer_size.
Expand Down
5 changes: 2 additions & 3 deletions scripts/run-tsbs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export LOG_DIR=${LOG_DIR:-${CURR_DIR}/logs}
export CERESDB_ADDR=${CERESDB_ADDR:-127.0.0.1:8831}
export CERESDB_PID_FILE=${CURR_DIR}/ceresdb-server.pid
export WRITE_WORKER_NUM=${WRITE_WORKER_NUM:-36}
export WRITE_BATCH_SIZE=${WRITE_BATCH_SIZE:500}
export WRITE_BATCH_SIZE=${WRITE_BATCH_SIZE:-500}
# Where generated data stored
export DATA_FILE=${DATA_FILE:-data.out}
# How many values in host tag
Expand Down Expand Up @@ -87,8 +87,7 @@ fi


# Write data to ceresdb
./tsbs_load_ceresdb --ceresdb-addr=${CERESDB_ADDR} --file ${DATA_FILE} --batch-size ${WRITE_BATH_SIZE} --workers ${WRITE_WORKER_NUM} | tee ${LOG_DIR}/write.log

./tsbs_load_ceresdb --ceresdb-addr=${CERESDB_ADDR} --file ${DATA_FILE} --batch-size ${WRITE_BATCH_SIZE} --workers ${WRITE_WORKER_NUM} | tee ${LOG_DIR}/write.log

# Generate queries for query
./scripts/generate_queries.sh
Expand Down