Feed Rss


 After you reboot with our uksm enabled kernel, uksm works as a system daemon — uksmd. The main interfaces for uksmd are under

Uksm is smart. For most of the time, you only need to adjust cpu_governor and max_cpu_percentage for cpu consumption control.

The meaning of each file in this directory is as below:

user controllable interfaces:

  • run : The main control interface to stop/run. e.g. echo 1 > run.
  • sleep_millisecs: how long will uksmd sleep before it wakes up and does its work.
  • cpu_governor:  The macro governors for controlling how aggressively the uksmd uses CPU. You can do cat cpu_governor to find out the available governors and which is currently active. e.g. [full] medium low quiet shows that currently it works at full speed. These governors roughly stand for 90%, 50%, 20%,  <1% of max CPU consumption and some pre-setting of micro-control parameters. (NOTE: for max it means only when uksmd is working at memory areas with many many redundancy pages. For most of the time uksmd is very quiet)
  • max_cpu_percentage: The max CPU consumption you can further specify under some cpu governor. It’s used when you are not happy with the preset values.

read-only interfaces:

  • full_scans: how many times uksmd sampling has covered all of your memory areas.
  • hash_strength: the current hash strength for adaptive-random-sampling hashing algorithm. The lower the faster uksmd gonna merge pages. Its range is 1 ~ 1034.
  • pages_scanned: how many pages has been scanned.
  • pages_shared: how many pages has been mapped by different page table entries, i.e. shared by different processes.
  • pages_sharing: this is roughly the number of redundant pages you have saved, with uksm.
  • sleep_times: how many times uksmd has waken up and then got sleep.
  • Since version of 0.1.1,the pages with full zeros will considered specially and seperately. You can get the information for uksmd merged zero pages by “cat /proc/meminfo | grep KsmZeroPages”.

advanced interfaces:

If anyone really cares about the advanced scan control of UKSM, please let me know 😉