+. schedutils 

# apt-get install schedutils (ubuntu)

# up2date schedutils (redhat)

# rpm -ivh schedutils* (redhat)



+. check for the taskset information for process

   > -p  : hex formant for cpu number

   > -pc : decimal formant for cpu number

# taskset -pc 2360 

pid 2360's current affinity list: 0



+. assign affinity with invoking the process

# taskset -c 1-3 /etc/init.d/httpd start



+. assign affinity on a running process

  > -p : Operate on an existing PID and do not launch a new task

  > -c : Specify a numerical list of processors instead of a bitmask.

         The numbers are separated by commas and may include ranges.  

       For example: 0,5,7,9-11.

# taskset -c 1 -p 12314

# taskset -c 3,4 -p 12314

블로그 이미지

Melting

,

+. memory space / number of large memory pages 

 - each huge page size : 16 MB

 - jvm heap size : 2048 MB

 - jvm instances : 4

 

 > total memory space for jvm heap 

     : 2048 MB * 4 (jvm) = 8 GB

   total memory space for huge page 

     : (1024 (1kb) * 1024 (1mb) * 1024 (1gb) * 2 (jvm heap) * 4 (jvm count)) - 1  = 8589934591

   total huge page number

     : 1024 (1gb) * 2 (jvm heap) * 4 (jvm count) / 16 (huge page size) = 512



+. allocate the shared memory segement 

#. echo 8589934591 > /proc/sys/kernel/shmmax   (temporary configuration)

#. vi /etc/sysctl.conf                         (permanent configuration)

   kernel.shmmax = 8589934591


+. set the number of huge pages

#. echo 512 > /proc/sys/vm/nr_hugepages        (temporary configuration)

#. vi /etc/sysctl.conf                         (permanent configuration)

   vm.nr_hugepages = 512


+. set the user group to access the huge pages (ex. user's group id : 1001) 

#. echo 1001 > /proc/sys/vm/hugetlb_shm_group  (temporary configuration)

#. vi /etc/sysctl.conf                         (permanent configuration)

   vm.hugetlb_shm_group = 1001


+. run jvm with huge page support option

 > java -Xlp -Xmn1400m -Xms2048m -Xmx2048m -XlockReservation -Xnoloa -XtlhPrefetch -Xaggressive -Xcompressedrefs -Xconcurrentlevel0

 > java -d64 -server -Xms2048m -Xmx2048m -Xss192k -XX:+UseLargePages -XX:LargePageSizeInBytes=2m -XX:+UseParNewGC



+. check the huge pages in memory 

#. cat /proc/meminfo | grep Huge


블로그 이미지

Melting

,




sg248080 - IBM Power Systems Performance Guide - Implementing and Optimizing.pdf


블로그 이미지

Melting

,