Skip to content

Commit

Permalink
- disable quotas by default on engines
Browse files Browse the repository at this point in the history
- move default to a diff file

Required-githooks: true

Signed-off-by: Alexander A Oganezov <alexander.a.oganezov@intel.com>
  • Loading branch information
frostedcmos committed Dec 12, 2023
1 parent d8fc6c9 commit f561648
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cart/crt_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ prov_data_init(struct crt_prov_gdata *prov_data, crt_provider_t provider,
return DER_SUCCESS;
}

#define CRT_QUOTA_RPCS_DEFAULT 64

/* first step init - for initializing crt_gdata */
static int data_init(int server, crt_init_options_t *opt)
Expand Down Expand Up @@ -325,7 +324,9 @@ static int data_init(int server, crt_init_options_t *opt)
d_getenv_int("CRT_CREDIT_EP_CTX", &credits);
}

crt_gdata.cg_rpc_quota = CRT_QUOTA_RPCS_DEFAULT;
/* Enable quotas by default only on clients */
crt_gdata.cg_rpc_quota = crt_is_service() ? 0 : CRT_QUOTA_RPCS_DEFAULT;

d_getenv_int("D_QUOTA_RPCS", &crt_gdata.cg_rpc_quota);

/* Must be set on the server when using UCX, will not affect OFI */
Expand Down
2 changes: 2 additions & 0 deletions src/cart/crt_rpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#define CRT_DEFAULT_TIMEOUT_S (60) /* second */
#define CRT_DEFAULT_TIMEOUT_US (CRT_DEFAULT_TIMEOUT_S * 1e6) /* micro-second */

#define CRT_QUOTA_RPCS_DEFAULT 64

/* uri lookup max retry times */
#define CRT_URI_LOOKUP_RETRY_MAX (8)

Expand Down

0 comments on commit f561648

Please sign in to comment.