Stop Coding!

The Unofficial Flex Compiler Blog

Running HFCD on a multi-CPU server

with one comment

I’ve been asked several times about this: Suppose I have a quad-core or 8-core server with lots of RAM. Can this machine run multiple instances of HFCD, each of which serves an instance of Flex Builder running on a ‘slow’ laptop on the same LAN?

I think the answer is yes… though someone has to do a field test for me. One little-known (or I should say undocumented) feature is that you can specify the admin and compiler port numbers on the command line when you start hfcd.

> ./hfcd

By default, it uses port 50207 and 50208. You can specify two different numbers like this:

> ./hfcd 50210 50211

Now, say if you want to start 4 instances of HFCD on your multi-CPU server, you can do:

> ./hfcd 50201 50202 &
> ./hfcd 50203 50204 &
> ./hfcd 50205 50206 &
> ./hfcd 50207 50208 &

Of course, you want to make sure that the combined value of the -Xmx setting of all instances is less than the amount of physical memory on that machine.

The next step is to adjust the IP address and port numbers in Flex Builder. In Flex Builder, simply click Preferences –> HellFire Compiler; change the address and port numbers and restart FB.

Now you may be wondering why several developers want to share one fast machine to compile Flex apps. Well, the key question is: how much time each developer would take from the machine to compile during a say, 8-hour work day and how frequent these developers send the compile requests to the machine? Do they all do it at or about the same time throughout the day? If the ‘collision’ rate is low on any given work day, the effect would be like each developer having exclusive access to the CPU resources. That’s obviously a lot better than the ‘local-HFCD’ scenario.

Advertisements

Written by Clement Wong

November 25, 2009 at 4:27 pm

One Response

Subscribe to comments with RSS.

  1. I really like your blog.. very nice colors & theme.
    Did you create this website yourself or did you hire someone to
    do it for you? Plz respond as I’m looking to design my own blog and would like to find out where u got this from. many thanks

    hertz Car rental estonia

    August 5, 2013 at 1:41 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: