12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

426CHAPTER 21Monitoring and Tuning the KernelFor example, the following command increases how much the system should use its swapspace from the default value of 60% to 70%:sysctl -w vm.swappiness=”70”This command enables the change immediately. To save the setting so that it is rememberedeven if the system is rebooted, add the following line to /etc/sysctl.conf:vm.swappiness = 70If you add the change to /etc/sysctl.conf without executing the sysctl -w vm.swappiness=”70” command, the change will not go into effect unless the sysctl-p command is also executed as root.Optimizing Virtual MemoryAs discussed in the “Using the /proc Directory” section earlier in this chapter, the settingsin /proc/sys/ can be modified with the sysctl -w =”” command orin the /etc/sysctl.conf file so that the change persists between reboots. One of thesubdirectories, /proc/sys/vm/, can be used to optimize how the virtual memory ismanaged by the kernel.Table 21.1 shows all the kernel virtual memory settings that can be configured in/etc/sysctl.conf and their default values. The virtual memory setting names are theones used with the sysctl utility.TIPTo retrieve a list of all the kernel virtual memory settings for your system, use thecommand sysctl -a | grep vm > sysctl_vm.txt. The resulting sysctl_vm.txtfile will contain the list along with their current values.TABLE 21.1 Virtual Memory SettingsVirtual Memory SettingDefault Valuevm.swap_token_timeout 300vm.legacy_va_layout 0vm.vfs_cache_pressure 100vm.block_dump 0vm.laptop_mode 0vm.max_map_count 65536vm.percpu_pagelist_fraction 0vm.min_free_kbytes 2894vm.drop_caches 0vm.lowmem_reserve_ratio 256 256 32vm.hugetlb_shm_group 0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!