|
|
Table of Contents |
You should run the latest Java virtual machine for Linux, available from the Blackdown Organization:
You should run JDK 1.1.6 Version 4a or later, since earlier versions had a bug in the socket timeout feature of Java. Not all of the mirror sites carry this latest version, so make sure to find a site with the file:
jdk1.1.6v4a-i386-glibc.tar.gz
You can verify your installation by typing "java
-fullversion" from the command line. You should see a version
with the following date or later:
java full version "stevemw:08/29/98-05:16"
Unless you rebuild the Linux kernel, each process is limited to 256 file descriptors. Since the VolanoChat server requires one file descriptor for each concurrent socket connection, you are limited by default to a maximum of 256 simultaneous connections.
The new Linux 2.1 kernel has support for 1024 file descriptors per process without requiring a rebuild, but Linux distributions ship the Linux 2.0 kernel. Red Hat Linux 4.2 uses the Linux 2.0.30 kernel, while Red Hat Linux 5.1 uses the Linux 2.0.34pre6 kernel. Oskar Pearson has posted a set of 2.0.34 kernel patches which can increase the file descriptor limits on your system. As an additional reference, the November 1997 issue of the Linux Journal magazine has a good article on rebuilding your kernel, titled Linux Kernel Installation.
You may be able to increase the file descriptor limit and rebuild the kernel yourself by making the following changes, given by David Schwartz. Keep in mind, though, that the instructions below may be different for your system.
/usr/include/linux/fs.h, change NR_OPEN
from 256 to 1024.
/usr/include/linux/limits.h, change both
NR_OPEN and OPEN_MAX from 256 to 1024.
/usr/include/linux/posix_types.h, make sure
__FD_SETSIZE is set to 1024.
/usr/include/gnu/types.h, change
__FD_SETSIZE from 256 to 1024.
/etc/rc.d/rc.local startup script:
/bin/echo "4096" > /proc/sys/kernel/file-max /bin/echo "8192" > /proc/sys/kernel/inode-max
/usr/src/linux and set up the kernel sources
with:
make mrproper
make xconfig
make dep make clean
make zImage make modules make modules_install
cp /usr/src/linux/arch/i386/boot/zImage /zImage
/etc/lilo.conf and then
running /sbin/lilo.
shutdown -r now
You can check whether your changes are effective by running the following C program:
#include <sys/types.h>
#include <fcntl.h>
#include <stdio.h>
void main(void) {
int k = 3;
while (dup(0) != -1)
k++;
printf("Opens = %d Fdsize = %d\n", k, sizeof(fd_set) * 8);
}
Both numbers printed should read 1024.
|
|
Check HTML | Table of Contents |