/etc/default/X and upstart jobs
clint at ubuntu.com
Wed Mar 16 16:21:55 UTC 2011
On Tue, 2011-03-15 at 07:58 +0100, Stephan Adig wrote:
> On Mon, 2011-03-14 at 15:44 -0700, Clint Byrum wrote:
> > This also has a small effect on the system boot speed by forcing a
> > random seek into /etc/default to read this tiny file. One of the ideas
> > behind upstart was to alleviate these things by pulling all of this
> > information into one place (the job config) which is read entirely in
> > one sweep early in the boot.
> Honestly, regarding the server side of live, it doesn't make a
> difference. 2.5 - 4 minutes hardware init time and then having an OS
> which boots up in less then 10 secs
Agreed, in servers, boot time is ridiculous to even worry about.
In an elastic cloud, seconds actually start to matter a little bit. If
you're scaling up to meet flash demand, 10 seconds vs 20 seconds even
matters. Also lets not forget that developer machines sometimes have
network services like tomcat and mysql running and starting on boot.
Even if you take out the speed of boot argument, we still have the issue
where this data is in a separate file and doesn't necessarily need to
> I'm more concerned about the non-transformed startup scripts which are
> still sysv.
> e.g. Tomcat6.
> ------------------------- snip ---------------------
> The default file could look like this:
> # Run Tomcat as this user ID. Not setting this or leaving it blank will
> use the
> # default of tomcat6.
> # The home directory of the Java development kit (JDK). You need at
> # JDK version 1.5. If JAVA_HOME is not set, some common directories for
> # OpenJDK, the Sun JDK, and various J2SE 1.5 versions are tried.
> # Directory for per-instance configuration files and webapps. It
> contains the
> # directories conf, logs, webapps, work and temp. See RUNNING.txt for
> # Default: /var/lib/tomcat6
> # Arguments to pass to the Java virtual machine (JVM).
> JAVA_OPTS="$JAVA_OPTS -Xmx4096M"
> JAVA_OPTS="$JAVA_OPTS -XX:PermSize=256M"
> JAVA_OPTS="$JAVA_OPTS -XX:MaxPermSize=512M"
> JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC"
> JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9003"
> JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
> JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=xxx.xxx.xxx.xxx"
> # Java compiler to use for translating JavaServer Pages (JSPs). You can
> use all
> # compilers that are accepted by Ant's build.compiler property.
> # Use the Java security manager? (yes/no, default: yes)
> # WARNING: Do not disable the security manager unless you understand
> # the consequences!
> # Number of days to keep logfiles in /var/log/tomcat6. Default is 14
> Those configs need to be handled carefully, when we move from sysV to
> upstart job files.
Yeah, my hacky example code would probably choke on this. That doesn't
mean we can't make a more robust converter that does handle all cases
well, since we're only dealing with shell variables.
More information about the ubuntu-devel