tuning rhel linux kernel for jboss app server


Please let me know the tuning parameters for the linux RHEL 4.0 kernel suggested by jboss to run the jboss application server 4.0.2

Who is Participating?
ramazanyichConnect With a Mentor Commented:
on this page http://www.mastertheboss.com/en/jboss-application-server/113-jboss-performance-tuning-1.html there is a special part regarding linux tuning:
Since in Linux everything is a file, check the file-max parameter

cat /proc/sys/fs/file-max

set fs.file-max=102642  into /etc/sysctl.conf

Raise ulimit with /etc/limits.conf (or ulimit -n for current session)

Increase default socket send/receive buffer

sysctl -w net.core.rmem_default=262144
(default socket receive buffer)

sysctl -w net.core.wmem_default=262144
(default socket send buffer)

sysctl -w net.core.rmem_max=262144
(max socket receive buffer)
sysctl -w net.core.wmem_max=262144
(max socket send buffer size)

Optimize MTU. The TCP maximum transfer unit is 1512 on the Internet. If you are sending larger packets it's a good idea to increase MTU size in order to reduce packet fragmentation (especially if you have a slow network)

vi /etc/sysconfig/network-scripts/ifcfg-xxx (eth0 for instance)

– add "MTU=9000" (for gigabit ethernet)
– restart the interface (ifdown eth0;ifup eth0)

Use Big Memory Pages

Default page size is 4KB (usually too small!)
Check page size with:

$ cat /proc/meminfo

If you see "HugePage_Total," "HugePages_Free" and "Hugepagesize", you can apply this optimization

Here's how to do it (2GB Heap Size Example)

$ echo 2147483647 > /proc/sys/kernel/shmmax
$ echo 1000 > /proc/sys/vm/nr_hugepages

In Sun's JVM, add this flag: XX:+UseLargePages
cjl7freelance for hireCommented:
You don't need to tune the kernel at all. (normally)

But things that you might need to adress is number of open files and of cource Java Heap config. But it's not kernel related...

All Courses

From novice to tech pro — start learning today.