Increase maximum number of outgoing connections for full node If incoming connections are disabled, Max full-relay connections are 8: src/net.h#L64 and Max block-relay-only connections are 2: src/net.h#L68
How are these decided and how can a user change these values?
Its mentioned in doc/reduce-memory.md that each connection takes up some memory. What if the user is okay with it?
Will changing MAX_OUTBOUND_FULL_RELAY_CONNECTIONS to 32 or above help in faster sync? Or dbcache and par are the only options to improve sync?
I tried changing it to 40 but extra nodes keep disconnecting. I see this line in the logs src/net_processing.cpp#L4581 and not sure if its related to DoS protection or something else.

Update 1: I commented the if statement here: src/net_processing.cpp#L4577 Compiled successfully and tests passed. I could see more than 15 peers connected but sync almost paused after few minutes and nothing happened. Couldn't find anything useful in logs.
Issue resolved. I was able to get 16 outgoing full relay connections that are stable using the below changes in code:
Adding below lines in src/init.cpp
argsman.AddArg(&quot;-maxoutfullrelay=&lt;n&gt;&quot;, strprintf(&quot;Maintain at most &lt;n&gt; outbound full relay connections to peers (default: %u)&quot;, MAX_OUTBOUND_FULL_RELAY_CONNECTIONS), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);

int nMaxOutboundFullRelay;

nMaxOutboundFullRelay = args.GetArg(&quot;-maxoutfullrelay&quot;, MAX_OUTBOUND_FULL_RELAY_CONNECTIONS);
nMaxOutboundFullRelay = std::max(nMaxOutboundFullRelay, 0);

connOptions.m_max_outbound_full_relay = std::min(nMaxOutboundFullRelay, connOptions.nMaxConnections);

And maxoutfullrelay=16 in bitcoin.conf. Tried with 20 as well and it works fine.