Memory and Other JVM Settings

I've been doing upgrades to test a lot of the EAP versions of TC 2. It takes a little while to update a new distribution to include the changes made to the previous one. You've come a long way in simplifying this, the most notable being that you store connection information in ~/.BuildServer now. But the memory settings aren't part of this.

It would be nice to be able to override the JVM startup parameters for both build agents and the server from outside the scripts themselves (and independently between the two) so that I wouldn't need to change the scripts by hand each time.

It looks like you are doing this a bit, with LAUNCHER_OPTS for buildAgent, but I don't see the equivalent for the server. Also, I think it would be worth breaking out just the memory opts as they are going to be the most likely to change. So something like:

if [ "$AGENT_MEM_OPTS" = "" ]; then
AGENT_MEM_OPTS ="-Xmx384m"
fi
if [ "$LAUNCHER_OPTS" = "" ]; then
LAUNCHER_OPTS="-ea $AGENT_MEM_OPTS -Dteamcity_logs=$LOG_DIR/"
fi

And something similar in catalina.sh, but with $SERVER_MEM_OPTS or the like.

Though most useful for memory options, you can also include other things in there, such as:

-Dcom.sun.management.jmxremote

or

-Dmodification.check.interval=]]>

--Tim

2 comments
Comment actions Permalink

Tim,

for server you can use the same option variables as for Tomcat (if you start server using catalina.sh or runAll.sh scripts). So you can add memory options to CATALINA_OPTS or JAVA_OPTS variable.

In house we have custom scripts with all additional options which
- sets environment variables and options
- cd TeamCity/bin
- call catalina.bat

Hope this helps,
KIR

0
Comment actions Permalink

Writing custom scripts is a poor solution for anyone outside Jetbrains as we would still have to track new releases to make sure that nothing else changed. The ability to externalize memory settings for the buildAgent seems like quite a reasonable expectation, especially as it seems to be reasonably variable from install to install. I'll file a Jira issue on it.

Thanks.

--Tim

0

Please sign in to leave a comment.