mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-04 07:14:00 +00:00
add small-memory-footprint option to configure
This adds the following option to configure: --enable-small-memory-footprint When enabled the following defines are set to reduce the overall memory footprint. MESSAGE_SIZE_MAX=1024*64 MESSAGE_QUEUE_MAX=512 PROCESSOR_COUNT_MAX=16 IPC_REQUEST_SIZE=1024*64 IPC_RESPONSE_SIZE=1024*64 IPC_DISPATCH_SIZE=1024*64 git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2410 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
147c81ffab
commit
b13a7aba13
10
configure.ac
10
configure.ac
@ -192,6 +192,10 @@ AC_ARG_ENABLE([coverage],
|
||||
[ --enable-coverage : coverage analysis of the codebase. ],
|
||||
[ default="no" ])
|
||||
|
||||
AC_ARG_ENABLE([small-memory-footprint],
|
||||
[ --enable-small-memory-footprint : Use small message queues and small messages sizes. ],
|
||||
[ default="no" ])
|
||||
|
||||
AC_ARG_ENABLE([nss],
|
||||
[ --enable-nss : Network Security Services encryption. ],,
|
||||
[ enable_nss="yes" ])
|
||||
@ -353,6 +357,12 @@ else
|
||||
COVERAGE_LDFLAGS=""
|
||||
fi
|
||||
|
||||
|
||||
if test "x${enable_small_memory_footprint}" = xyes ; then
|
||||
AC_DEFINE_UNQUOTED([HAVE_SMALL_MEMORY_FOOTPRINT], 1, [have small_memory_footprint])
|
||||
PACKAGE_FEATURES="$PACKAGE_FEATURES small-memory-footprint"
|
||||
fi
|
||||
|
||||
if test "x${enable_ansi}" = xyes && \
|
||||
cc_supports_flag -std=iso9899:199409 ; then
|
||||
AC_MSG_NOTICE([Enabling ANSI Compatibility])
|
||||
|
@ -60,7 +60,11 @@ enum corosync_service_types {
|
||||
AMF_V2_SERVICE = 17
|
||||
};
|
||||
|
||||
#define PROCESSOR_COUNT_MAX 384
|
||||
#ifdef HAVE_SMALL_MEMORY_FOOTPRINT
|
||||
#define PROCESSOR_COUNT_MAX 16
|
||||
#else
|
||||
#define PROCESSOR_COUNT_MAX 384
|
||||
#endif /* HAVE_SMALL_MEMORY_FOOTPRINT */
|
||||
|
||||
#define TOTEMIP_ADDRLEN (sizeof(struct in6_addr))
|
||||
|
||||
|
@ -65,16 +65,17 @@ struct corosync_tpg_group {
|
||||
|
||||
#define TOTEMIP_ADDRLEN (sizeof(struct in6_addr))
|
||||
|
||||
#define PROCESSOR_COUNT_MAX 384
|
||||
#define INTERFACE_MAX 2
|
||||
|
||||
#ifndef MESSAGE_SIZE_MAX
|
||||
#ifdef HAVE_SMALL_MEMORY_FOOTPRINT
|
||||
#define PROCESSOR_COUNT_MAX 16
|
||||
#define MESSAGE_SIZE_MAX 1024*64
|
||||
#define MESSAGE_QUEUE_MAX 512
|
||||
#else
|
||||
#define PROCESSOR_COUNT_MAX 384
|
||||
#define MESSAGE_SIZE_MAX 1024*1024 /* (1MB) */
|
||||
#endif /* MESSAGE_SIZE_MAX */
|
||||
|
||||
#ifndef MESSAGE_QUEUE_MAX
|
||||
#define MESSAGE_QUEUE_MAX MESSAGE_SIZE_MAX / totem_config->net_mtu
|
||||
#endif /* MESSAGE_QUEUE_MAX */
|
||||
#define MESSAGE_QUEUE_MAX MESSAGE_SIZE_MAX / totem_config->net_mtu
|
||||
#endif /* HAVE_SMALL_MEMORY_FOOTPRINT */
|
||||
|
||||
#define TOTEM_AGREED 0
|
||||
#define TOTEM_SAFE 1
|
||||
|
@ -36,15 +36,16 @@
|
||||
#define TOTEM_H_DEFINED
|
||||
#include "totemip.h"
|
||||
|
||||
#ifndef MESSAGE_SIZE_MAX
|
||||
#define MESSAGE_SIZE_MAX 1024*1024 /* (1MB) */
|
||||
#endif /* MESSAGE_SIZE_MAX */
|
||||
|
||||
#ifndef MESSAGE_QUEUE_MAX
|
||||
#define MESSAGE_QUEUE_MAX MESSAGE_SIZE_MAX / totem_config->net_mtu
|
||||
#endif /* MESSAGE_QUEUE_MAX */
|
||||
|
||||
#ifdef HAVE_SMALL_MEMORY_FOOTPRINT
|
||||
#define PROCESSOR_COUNT_MAX 16
|
||||
#define MESSAGE_SIZE_MAX 1024*64
|
||||
#define MESSAGE_QUEUE_MAX 512
|
||||
#else
|
||||
#define PROCESSOR_COUNT_MAX 384
|
||||
#define MESSAGE_SIZE_MAX 1024*1024 /* (1MB) */
|
||||
#define MESSAGE_QUEUE_MAX MESSAGE_SIZE_MAX / totem_config->net_mtu
|
||||
#endif /* HAVE_SMALL_MEMORY_FOOTPRINT */
|
||||
|
||||
#define FRAME_SIZE_MAX 10000
|
||||
#define TRANSMITS_ALLOWED 16
|
||||
#define SEND_THREADS_MAX 16
|
||||
|
@ -53,8 +53,14 @@ static inline cs_error_t hdb_error_to_cs (int res) \
|
||||
} \
|
||||
}
|
||||
|
||||
#ifdef HAVE_SMALL_MEMORY_FOOTPRINT
|
||||
#define IPC_REQUEST_SIZE 1024*64
|
||||
#define IPC_RESPONSE_SIZE 1024*64
|
||||
#define IPC_DISPATCH_SIZE 1024*64
|
||||
#else
|
||||
#define IPC_REQUEST_SIZE 8192*128
|
||||
#define IPC_RESPONSE_SIZE 8192*128
|
||||
#define IPC_DISPATCH_SIZE 8192*128
|
||||
#endif /* HAVE_SMALL_MEMORY_FOOTPRINT */
|
||||
|
||||
#endif /* AIS_UTIL_H_DEFINED */
|
||||
|
Loading…
Reference in New Issue
Block a user