DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
LKP System Management

Tuning for Linux applications

UnixWare 7 defaults are not appropriate for some Linux applications. To successfully run Linux applications you need to

Resizing /tmp

Some Linux applications may require a larger /tmp area than UnixWare 7 allocates. If your application fails because of a lack of /tmp space, you can reinstall and specify a larger size, or allow /tmp to consume all virtual memory on the system.

If you remove the swapmax option for /tmp from the file /etc/vfstab, /tmp can expand to use as much virtual memory as is available on the system. If necessary, system virtual memory can be increased by ``Adding swap space''. This has the effect of making /tmp appear larger.

Before changing or removing the swapmax variable, the line looks like this:

   /tmp    -       /tmp    memfs   -       yes swapmax=10485760,rootmode=1777

After removing the variable, the line looks like this:

   /tmp    -       /tmp    memfs   -       yes rootmode=1777
Reboot the system to activate the change.

Adding swap space

You might need to add more swap space to support a resized /tmp, or to accommodate multiple large processes or threads. To add swap space on an already installed system:

  1. Log in as root.

  2. Use the dd command to create a file equivalent in size to the amount of swap space you are adding:
       dd if=/dev/null of=file oseek=num bs=blocksize
    
    where file is the full pathname of the new file, num is the amount of swap space desired, and blocksize is the block size for both input and output. file must be in the root filesystem (``/''): if it is not, the swaptab will not be able to add it.

  3. Use a text editor to edit the /etc/swaptab file and add information for device_name, start_offset, and size:
       file 0 -
    
    The device_name is the name of the file you created using the dd command, the start_offset is 0, and the minus sign indicates that the entire file is to be used as the size of the new swap space.

  4. Reboot the system to make the new swap space available for use, or add it dynamically using
       swap -a file
    
    See swap(1M).

Increasing file descriptor and virtual memory limits

Some Linux applications; for example, a JVM, might require a higher file descriptor limit. If an application can't open files because the file descriptor limit has been exceeded, you might get a NoClassDefFoundError error message. Increase the limit from 64 (default) to 2048 by issuing the command:

   ulimit -n 2048

Also, some applications like the SCO JDK require that the virtual memory resource limit be set to unlimited.

   ulimit -v unlimited

Next topic: Security and LKP
Previous topic: General tuning considerations

© 2002 Caldera International, Inc. All rights reserved.
UnixWare 7 Release 7.1.3 - 17 October 2002