|
@@ -40,6 +40,25 @@ unsigned aeronConnectTimeout = 5000;
|
|
|
unsigned aeronPollFragmentsLimit = 10;
|
|
|
unsigned aeronIdleSleepMs = 1;
|
|
|
|
|
|
+unsigned aeronMtuLength = 0;
|
|
|
+unsigned aeronSocketRcvbuf = 0;
|
|
|
+unsigned aeronSocketSndbuf = 0;
|
|
|
+unsigned aeronInitialWindow = 0;
|
|
|
+
|
|
|
+extern UDPLIB_API void setAeronProperties(const IPropertyTree *config)
|
|
|
+{
|
|
|
+ useEmbeddedAeronDriver = config->getPropBool("@aeronUseEmbeddedDriver", true);
|
|
|
+ aeronConnectTimeout = config->getPropInt("@aeronConnectTimeout", 5000);
|
|
|
+ aeronPollFragmentsLimit = config->getPropInt("@aeronPollFragmentsLimit", 10);
|
|
|
+ aeronIdleSleepMs = config->getPropInt("@aeronIdleSleepMs", 1);
|
|
|
+
|
|
|
+ aeronMtuLength = config->getPropInt("@aeronMtuLength", 0);
|
|
|
+ aeronSocketRcvbuf = config->getPropInt("@aeronSocketRcvbuf", 0);
|
|
|
+ aeronSocketSndbuf = config->getPropInt("@aeronSocketSndbuf", 0);
|
|
|
+ aeronInitialWindow = config->getPropInt("@aeronInitialWindow", 0);
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
static std::thread aeronDriverThread;
|
|
|
static InterruptableSemaphore driverStarted;
|
|
|
|
|
@@ -81,13 +100,10 @@ int startAeronDriver()
|
|
|
context->warn_if_dirs_exist = false;
|
|
|
context->term_buffer_sparse_file = false;
|
|
|
|
|
|
- // MORE - should possibly allow these to be configured, or experiment to find what values work well for Roxie
|
|
|
- // In my (very rudimentary and non-representative) tests these values seem ok.
|
|
|
-
|
|
|
- context->mtu_length=16384;
|
|
|
- context->socket_rcvbuf=2097152;
|
|
|
- context->socket_sndbuf=2097152;
|
|
|
- context->initial_window_length=2097152;
|
|
|
+ if (aeronMtuLength) context->mtu_length = aeronMtuLength;
|
|
|
+ if (aeronSocketRcvbuf) context->socket_rcvbuf = aeronSocketRcvbuf;
|
|
|
+ if (aeronSocketSndbuf) context->socket_sndbuf = aeronSocketSndbuf;
|
|
|
+ if (aeronInitialWindow) context->initial_window_length = aeronInitialWindow;
|
|
|
|
|
|
if (aeron_driver_init(&driver, context) < 0)
|
|
|
throw makeStringExceptionV(MSGAUD_operator, -1, "AERON: error initializing driver (%d) %s", aeron_errcode(), aeron_errmsg());
|