1/*
2 * thr_query.h
3 *
4 * Copyright (C) 2016 Aerospike, Inc.
5 *
6 * Portions may be licensed to Aerospike, Inc. under one or more contributor
7 * license agreements.
8 *
9 * This program is free software: you can redistribute it and/or modify it under
10 * the terms of the GNU Affero General Public License as published by the Free
11 * Software Foundation, either version 3 of the License, or (at your option) any
12 * later version.
13 *
14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
17 * details.
18 *
19 * You should have received a copy of the GNU Affero General Public License
20 * along with this program. If not, see http://www.gnu.org/licenses/
21 */
22
23/*
24 * QUERY Engine Defaults
25 */
26// **************************************************************************************************
27#define QUERY_BATCH_SIZE 100
28#define AS_MAX_NUM_SCRIPT_PARAMS 10
29#define AS_QUERY_BUF_SIZE 1024 * 1024 * 2 // At least 2 Meg
30#define AS_QUERY_MAX_BUFS 256 // That makes it 512 meg max in steady state
31#define AS_QUERY_MAX_QREQ 1024 // this is 4 kb
32#define AS_QUERY_MAX_QTR_POOL 128 // They are 4MB+ each ...
33#define AS_QUERY_MAX_THREADS 32
34#define AS_QUERY_MAX_WORKER_THREADS 15 * AS_QUERY_MAX_THREADS
35#define AS_QUERY_MAX_QREQ_INFLIGHT 100 // worker queue capping per query
36#define AS_QUERY_MAX_QUERY 500 // 32 MB be little generous for now!!
37#define AS_QUERY_MAX_SHORT_QUEUE_SZ 500 // maximum 500 outstanding short running queries
38#define AS_QUERY_MAX_LONG_QUEUE_SZ 500 // maximum 500 outstanding long running queries
39#define AS_QUERY_MAX_UDF_TRANSACTIONS 20 // Higher the value more aggressive it will be
40#define AS_QUERY_MAX_OPS_TRANSACTIONS 20 // Higher the value more aggressive it will be
41#define AS_QUERY_UNTRACKED_TIME 1000 // (millisecond) 1 sec
42#define AS_QUERY_WAIT_MAX_TRAN_US 1000
43// **************************************************************************************************
44