Print this page
2831 svc.startd and svc.configd waste memory.

@@ -21,11 +21,13 @@
 /*
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
+/*
+ * Copyright (c) 2012, Joyent, Inc. All rights reserved.
+ */
 
 #include <assert.h>
 #include <door.h>
 #include <errno.h>
 #include <fcntl.h>

@@ -107,10 +109,22 @@
 
 int             max_repository_backups = 4;
 
 #define CONFIGD_MAX_FDS         262144
 
+const char *
+_umem_options_init(void)
+{
+        /*
+         * Like svc.startd, we set our UMEM_OPTIONS to indicate that we do not
+         * wish to have per-CPU magazines to reduce our memory footprint.  And
+         * as with svc.startd, if svc.configd is so MT-hot that this becomes a
+         * scalability problem, there are deeper issues...
+         */
+        return ("nomagazines");         /* UMEM_OPTIONS setting */
+}
+
 /*
  * Thanks, Mike
  */
 void
 abort_handler(int sig, siginfo_t *sip, ucontext_t *ucp)