Skip to content

Commit

Permalink
Reduce RPC Proxy memory consumption
Browse files Browse the repository at this point in the history
These changes,

- Reduce the memory consumption of the RPC Proxy
by reducing the number of copies of the RPC Proxy messsage being
simultaneously held.

- Add a KConfig flag for defining the Network connection
retry timer period.

- Redifine the RPC Proxy systemName string length from
LIMIT_MAX_IPC_INTERFACE_NAME_BYTES (128 bytes) to
LIMIT_MAX_SYSTEM_NAME_BYTES (64 bytes).

Resolves: LE-13369
Change-Id: Ie842a06aaabd3a79c70c59d1fe78237b82c3e06a
  • Loading branch information
LarsMartin1 authored and awm committed Aug 29, 2019
1 parent e2ca81d commit 64f4a2b
Show file tree
Hide file tree
Showing 9 changed files with 180 additions and 169 deletions.
6 changes: 3 additions & 3 deletions apps/tools/rpcTool/tool.c
Expand Up @@ -477,7 +477,7 @@ static void PrintAllBindings
)
{
char serviceName[LIMIT_MAX_IPC_INTERFACE_NAME_BYTES];
char systemName[LIMIT_MAX_IPC_INTERFACE_NAME_BYTES];
char systemName[LIMIT_MAX_SYSTEM_NAME_BYTES];
char remoteServiceName[LIMIT_MAX_IPC_INTERFACE_NAME_BYTES];
uint32_t serviceId;
le_result_t result;
Expand Down Expand Up @@ -542,7 +542,7 @@ static void PrintAllLinks
void
)
{
char systemName[LIMIT_MAX_IPC_INTERFACE_NAME_BYTES];
char systemName[LIMIT_MAX_SYSTEM_NAME_BYTES];
char linkName[LIMIT_MAX_IPC_INTERFACE_NAME_BYTES];
char parameters[LIMIT_MAX_IPC_INTERFACE_NAME_BYTES];
le_rpc_NetworkState_t state;
Expand Down Expand Up @@ -641,7 +641,7 @@ COMPONENT_INIT
{
case OBJECT_BINDING:
{
char systemName[LIMIT_MAX_IPC_INTERFACE_NAME_BYTES];
char systemName[LIMIT_MAX_SYSTEM_NAME_BYTES];
char remoteServiceName[LIMIT_MAX_IPC_INTERFACE_NAME_BYTES];
uint32_t serviceId;
result = le_rpc_GetSystemBinding(
Expand Down
23 changes: 16 additions & 7 deletions framework/KConfig
Expand Up @@ -633,26 +633,35 @@ config RPC_PROXY_MAX_MESSAGE
The maximum size of a RPC message that can be sent and received between RPC-enabled systems.

config RPC_PROXY_NETWORK_KEEPALIVE_SERVICE_INTERVAL
int "Frequency of RPC Keep-Alive network service"
int "Frequency of RPC Keep-Alive network service (in seconds)"
depends on RPC
range 0 1800
range 1 4294967295
default 120
---help---
The Frequency of Keep-Alice service, used to monitor the health of a remote RPC-enabled system.

config RPC_PROXY_NETWORK_KEEPALIVE_REQUEST_TIMER_INTERVAL
int "RPC Keep-Alive time-out period"
config RPC_PROXY_NETWORK_KEEPALIVE_TIMEOUT_TIMER_INTERVAL
int "RPC Keep-Alive time-out period (in seconds)"
depends on RPC
range 0 300
range 1 4294967295
default 30
---help---
The length of time the RPC Proxy will wait before declaring a
remote RPC-enabled system as unreachable (DOWN).

config RPC_PROXY_NETWORK_CONNECTION_RETRY_TIMER_INTERVAL
int "Network connection retry timer (in seconds)"
depends on RPC
range 1 4294967295
default 15
---help---
The length of time the RPC Proxy will wait before attempting to
re-connect to a remote RPC-enabled system.

config RPC_PROXY_CONNECT_SERVICE_REQUEST_TIMER_INTERVAL
int "RPC Connect-Service time-out period"
int "RPC Connect-Service time-out period (in seconds)"
depends on RPC
range 0 300
range 1 4294967295
default 15
---help---
The length of time the RPC Proxy will wait before abandoning a
Expand Down

0 comments on commit 64f4a2b

Please sign in to comment.