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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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...

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java App Servers

From novice to tech pro — start learning today.