1
1

The Mac appears to have problems with the keepalive support - once keepalive starts, the memory footprint soars. So disable keepalive on the Mac

Этот коммит содержится в:
Ralph Castain 2015-05-14 18:09:13 -06:00
родитель 1488e82efd
Коммит 8e30579e6e
3 изменённых файлов: 12 добавлений и 4 удалений

Просмотреть файл

@ -57,6 +57,12 @@ AC_DEFUN([OPAL_CHECK_OS_FLAVORS],
[$opal_have_solaris],
[Whether or not we have solaris])
AS_IF([test "$opal_found_apple" = "yes"],
[opal_have_mac=1], [opal_have_mac=0])
AC_DEFINE_UNQUOTED([OPAL_HAVE_MAC],
[$opal_have_mac],
[Whether or not we are on a Mac])
# check for sockaddr_in (a good sign we have TCP)
AC_CHECK_HEADERS([netdb.h netinet/in.h netinet/tcp.h])
AC_CHECK_TYPES([struct sockaddr_in],

Просмотреть файл

@ -72,7 +72,7 @@
/**
* Set socket buffering
*/
#if defined(SO_KEEPALIVE) && !OPAL_HAVE_MAC
static void set_keepalive(int sd)
{
int option;
@ -146,6 +146,7 @@ static void set_keepalive(int sd)
}
#endif // TCP_KEEPCNT
}
#endif //SO_KEEPALIVE
void orte_oob_tcp_set_socket_options(int sd)
{
@ -181,7 +182,7 @@ void orte_oob_tcp_set_socket_options(int sd)
opal_socket_errno);
}
#endif
#if defined(SO_KEEPALIVE)
#if defined(SO_KEEPALIVE) && !OPAL_HAVE_MAC
if (0 < mca_oob_tcp_component.keepalive_time) {
set_keepalive(sd);
}

Просмотреть файл

@ -404,7 +404,7 @@ static int tcp_component_register(void)
&mca_oob_tcp_component.disable_ipv6_family);
#endif
#if !OPAL_HAVE_MAC
mca_oob_tcp_component.keepalive_time = 10;
(void)mca_base_component_var_register(component, "keepalive_time",
"Idle time in seconds before starting to send keepalives (num <= 0 ----> disable keepalive)",
@ -427,7 +427,8 @@ static int tcp_component_register(void)
OPAL_INFO_LVL_9,
MCA_BASE_VAR_SCOPE_READONLY,
&mca_oob_tcp_component.keepalive_probes);
#endif
mca_oob_tcp_component.retry_delay = 0;
(void)mca_base_component_var_register(component, "retry_delay",
"Time (in sec) to wait before trying to connect to peer again",