Print this page
2831 svc.startd and svc.configd waste memory.
@@ -19,10 +19,11 @@
* CDDL HEADER END
*/
/*
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Joyent, Inc. All rights reserved.
*/
/*
* startd.c - the master restarter
*
@@ -141,10 +142,11 @@
#define INITIAL_REBIND_ATTEMPTS 5
#define INITIAL_REBIND_DELAY 3
pthread_mutexattr_t mutex_attrs;
+#ifdef DEBUG
const char *
_umem_debug_init(void)
{
return ("default,verbose"); /* UMEM_DEBUG setting */
}
@@ -152,11 +154,24 @@
const char *
_umem_logging_init(void)
{
return ("fail,contents"); /* UMEM_LOGGING setting */
}
+#endif
+const char *
+_umem_options_init(void)
+{
+ /*
+ * To reduce our memory footprint, we set our UMEM_OPTIONS to indicate
+ * that we do not wish to have per-CPU magazines -- if svc.startd is so
+ * hot on CPU such that this becomes a scalability problem, there are
+ * likely deeper things amiss...
+ */
+ return ("nomagazines"); /* UMEM_OPTIONS setting */
+}
+
/*
* startd_alloc_retry()
* Wrapper for allocation functions. Retries with a decaying time
* value on failure to allocate, and aborts startd if failure is
* persistent.