OS tuning

Every OS has its own prerequisites to run Tomcat 7 and the system has to be tuned based on the application's requirement, but there are some similarities between each OS. Let's discuss the common module used for optimization of Tomcat 7 for every OS. The OS plays a vital role for increasing the performance. Depending on the hardware, the application's performance will increase or decrease. Some of the points which are very much useful for the application are:

  • Performance characteristics of the 64 bit versus 32 bit VM: The benefits of using 64 bit VMs are being able to address larger amounts of memory, which comes with a small performance loss in 64 bit VMs versus running the same application on a 32 bit VM. You can allocate more than 4 GB JVM for a memory-intensive application.

Note

In case you are using a 64 bit JVM edition, then you have to add 30 percent more memory as compared to a 32 bit JVM edition.

  • Files size: Based on the application requirement, the file size is set in the OS. If the application is using a very high number of transactions, then the file limit needs to be increased.
  • Ulimits: Based on the sessions, a user can increase the limits.

Note

These values are defined in /etc/sysctl.conf. If you need to update any of the above parameters then update it in etc/sysctl.conf, otherwise all the details will be flushed after the reboot of the OS.

  • Huge page size: Many applications send a huge page size causing the application to run slow. In this case, you can increase the page size based on the application needs. You can check the page size by running the following command:
[root@localhost bin]# cat /proc/meminfo
MemTotal: 1571836 kB
MemFree: 886116 kB
Buffers: 74712 kB
Cached: 430088 kB
SwapCached: 0 kB
Active: 308608 kB
Inactive: 331944 kB
HighTotal: 671680 kB
HighFree: 97708 kB
LowTotal: 900156 kB
LowFree: 788408 kB
SwapTotal: 2040212 kB
SwapFree: 2040212 kB
Dirty: 36 kB
Writeback: 0 kB
AnonPages: 135764 kB
Mapped: 54828 kB
Slab: 33840 kB
PageTables: 3228 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 2826128 kB
Committed_AS: 496456 kB
VmallocTotal: 114680 kB
VmallocUsed: 4928 kB
VmallocChunk: 109668 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 4096 kB
  • It will show you the complete details of the memory. Based on the current utilization, you can increase the value.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.218.147