<CHAPTER id="Hints">
<TITLE>Hints and Tips</TITLE>
<SECT1><TITLE>Locked Processes</TITLE>
<PARA>
If for some reason you find your processes are always locked in
     your home node and you can't find the reason, you can put the
     following lines into your ~/.profile as a stop-gap measure to
     automatically enable migration:

<PROGRAMLISTING>
        if [ -x /proc/$$/lock ]; then
           echo 0 > /proc/$$/lock
        fi
</PROGRAMLISTING>

     However, you should make an effort to find out what the problems is
</PARA>
</SECT1>
<SECT1>
<TITLE>Choosing your processes</TITLE>
<PARA>
You will probably want to test your setup before deciding which
     programs you want to enable migration for. For example, if you are
     running KDE2 on a slow machine and have a significantly faster
     machine has part of your Mosix cluster, you might find
     resource-hungry programs like kmail are migrated out. This is not a
     bad thing as such, however, it can lead to a brief moment when your
     writing is not displayed on the screen immediately.

</PARA>
</SECT1>
<SECT1><TITLE> Java and openMosix</TITLE>
<PARA>

Green Threads JVM's, allow for migration because each Java thread is a separate process.
Threads other than Java green thread JVM's cannot be migrated by Linux, so openMosix cannot migrate programs that use them.
</para>
<para>


If you have the source so your Java application you might be able to compile the application native. In this case you might be able to migrate 
your applications to another node.
</para>
<para>

Gian Paolo Ghilardi wrote a paper titled Consideration on OpenMosix it deals amongst other topics with Java an 
dopenMosix.
<ulink url="
http://www.democritos.it/events/openMosix/papers/crema.pdf"><citetitle>
http://www.democritos.it/events/openMosix/papers/crema.pdf</citetitle></ulink>

</PARA>
</SECT1>

<SECT1><TITLE>openMosix and Hyperthreading</title> <para> Basically openMosix
performance increases with the current Linux scheduler when Hypethreading is
disabled. You can do this by either entering 'noht' as a boot option or
disabling HT in the bios.


</para><para>For those who are still wondering what hypetrheading is :
<ulink url="http://www.intel.com/technology/hyperthread/"><citetitle>Intel 
explains it</citetitle></ulink>
</para>
</sect1>
<sect1><title>openMosix and Firewalls</title>
<para>People often have questions regarding openMosix and firewalls.
Amit helped  me out on this matter: 
<programlisting>
from hpc/comm.c:

#define MIG_DAEMON_PORT         0x3412
#define INFO_DAEMON_PORT        0x3415
</programlisting>
converted to decimal, they are: 4660 and 5428 resp. (convert 1234, and not 
3412, 'cos of the network-host byte ordering conversions.. Read the 
IP/TCP/UDP RFCs for info)
</para>
<para>
the mig_daemon port is a tcp port, the info_daemon port is udp.
Hence tcp/4660 and udp/5428, Matt also mentions tcp/723 somewhere.


</para>
</sect1>
</CHAPTER>

