Skip to content

Dedicated queue writers #5029

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion bbinc/thdpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ typedef void (*thdpool_thddque_fn)(struct thdpool *pool, struct workitem *item,
typedef void (*thdpool_foreach_fn)(struct thdpool *pool, struct workitem *item,
void *user);
void thdpool_foreach(struct thdpool *pool, thdpool_foreach_fn, void *user);

typedef void (*thdpool_for_each_thd_fn)(struct thdpool *pool, pthread_t tid, int idle, void *thddata, void *user);
void thdpool_for_each_thd(struct thdpool *pool, thdpool_for_each_thd_fn, void *user);
struct thdpool *thdpool_create(const char *name, size_t per_thread_data_sz);
int thdpool_destroy(struct thdpool **pool_p, int coopWaitUs);
void thdpool_set_stack_size(struct thdpool *pool, size_t sz_bytes);
Expand Down
23 changes: 0 additions & 23 deletions bdb/bdb_thd_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,29 +156,6 @@ static ssize_t bdb_write(int fd, const void *buf, size_t nbytes)
return rc;
}

void bdb_set_io_control(void (*start)(), void (*cmplt)())
{
logmsg(LOGMSG_DEBUG, "IO CONTROL disabled\n");
if (1)
return;
#if 0
io_start=start;
io_cmplt=cmplt;

if
(
db_env_set_func_read(bdb_read) ||
db_env_set_func_fsync(bdb_fsync) ||
db_env_set_func_write(bdb_write)
)
{
printf("**FAILED db_env_set_func_pread RC\n");
abort();
}
printf("SET UP THD IO CONTROL\n");
#endif
}

void bdb_get_iostats(int *n_reads, int *l_reads, int *n_writes, int *l_writes)
{
*n_reads = norm_reads;
Expand Down
4 changes: 4 additions & 0 deletions db/comdb2.h
Original file line number Diff line number Diff line change
Expand Up @@ -1292,6 +1292,7 @@ struct osql_sess {
pthread_mutex_t participant_lk;
int is_done;
int is_sanctioned; /* set by fdb from coordinator-master */
int is_qconsume_only;
};
typedef struct osql_sess osql_sess_t;

Expand Down Expand Up @@ -1834,6 +1835,9 @@ extern int gbl_appsock_pooling;
extern struct thdpool *gbl_appsock_thdpool;
extern struct thdpool *gbl_osqlpfault_thdpool;
extern struct thdpool *gbl_udppfault_thdpool;
extern struct thdpool *gbl_handle_buf_write_thdpool;
extern struct thdpool *gbl_handle_buf_read_thdpool;
extern struct thdpool *gbl_handle_buf_queue_thdpool;

extern int gbl_consumer_rtcpu_check;
extern int gbl_node1rtcpuable;
Expand Down
2 changes: 2 additions & 0 deletions db/db_tunables.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,8 @@ extern int gbl_sc_history_max_rows;
extern int gbl_sc_status_max_rows;
extern int gbl_rep_process_pstack_time;
extern int gbl_sql_recover_time;
extern int gbl_queue_use_dedicated_writers;
extern int gbl_queue_max_dedicated_writers;

extern void set_snapshot_impl(snap_impl_enum impl);
extern const char *snap_impl_str(snap_impl_enum impl);
Expand Down
2 changes: 2 additions & 0 deletions db/db_tunables.h
Original file line number Diff line number Diff line change
Expand Up @@ -2499,4 +2499,6 @@ REGISTER_TUNABLE("sc_status_max_rows", "Max number of rows returned in comdb2_sc
REGISTER_TUNABLE("rep_process_pstack_time", "pstack the server if rep_process runs longer than time specified in secs (Default: 30s)",
TUNABLE_INTEGER, &gbl_rep_process_pstack_time, 0, NULL, NULL, NULL, NULL);
REGISTER_TUNABLE("sql_recover_time", "Number of msec before checking if SQL has waiters. 0 will disable. (Default: 10ms)", TUNABLE_INTEGER, &gbl_sql_recover_time, 0, NULL, NULL, NULL, NULL);
REGISTER_TUNABLE("queue_use_dedicated_writers", "Whether queue-consumes are processed in dedicated writers. (Default: on)", TUNABLE_BOOLEAN, &gbl_queue_use_dedicated_writers, 0, NULL, NULL, NULL, NULL);
REGISTER_TUNABLE("queue_max_dedicated_writers", "Max number of dedicated queue-consume writers. (Default: on)", TUNABLE_INTEGER, &gbl_queue_max_dedicated_writers, 0, NULL, NULL, NULL, NULL);
#endif /* _DB_TUNABLES_H */
Loading