[Android Software/Hacking General [Developers Only]] gu5t3r:
[MENTION=3357461]zeppelinrox[/MENTION]

busybox top -bn 5 | grep [k]smd; for i in /sys/kernel/mm/*ksm*/*; do echo -n "${i#*/mm/} - "; cat $i; done
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]

uksm/full_scans - 1
uksm/hash_strength - 64
uksm/min_scan_ratio - 1
uksm/pages_scanned - 0
uksm/pages_shared - 0
uksm/pages_sharing - 0
uksm/pages_unshared - 0
uksm/run - 0
uksm/scan_batch_pages - 15000
uksm/sleep_millisecs - 60
uksm/sleep_times - 0
uksm/thrash_threshold - 50

echo 12800 > /sys/kernel/mm/*ksm*/scan_batch_pages; echo 15000 > /sys/kernel/mm/*ksm*/sleep_millisecs; echo 1 > /sys/kernel/mm/*ksm*/run; busybox top -bn 30 | grep [k]smd; for i in /sys/kernel/mm/*ksm*/*; do echo -n "${i#*/mm/} - "; cat $i; done
112 2 root SWN 0 0.0 5.5 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]

uksm/full_scans - 2
uksm/hash_strength - 64
uksm/min_scan_ratio - 1
uksm/pages_scanned - 19
uksm/pages_shared - 0
uksm/pages_sharing - 0
uksm/pages_unshared - 16
uksm/run - 1
uksm/scan_batch_pages - 12800
uksm/sleep_millisecs - 15000
uksm/sleep_times - 9
uksm/thrash_threshold - 50

echo 10000 > /sys/kernel/mm/*ksm*/scan_batch_pages; echo 100 > /sys/kernel/mm/*ksm*/sleep_millisecs; echo 1 > /sys/kernel/mm/*ksm*/run; busybox top -bn 30 | grep [k]smd; for i in /sys/kernel/mm/*ksm*/*; do echo -n "${i#*/mm/} - "; cat $i; done
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 5.9 [uksmd]
112 2 root SWN 0 0.0 6.3 [uksmd]
112 2 root RWN 0 0.0 4.5 [uksmd]
112 2 root SWN 0 0.0 40.7 [uksmd]
112 2 root RWN 0 0.0 17.5 [uksmd]
112 2 root SWN 0 0.0 2.5 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]

uksm/full_scans - 16
uksm/hash_strength - 63
uksm/min_scan_ratio - 1
uksm/pages_scanned - 170671
uksm/pages_shared - 270
uksm/pages_sharing - 5084
uksm/pages_unshared - 30414
uksm/run - 1
uksm/scan_batch_pages - 10000
uksm/sleep_millisecs - 100
uksm/sleep_times - 1302
uksm/thrash_threshold - 50

busybox top -bn 30 | grep [k]smd;
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 3.3 [uksmd]
112 2 root SWN 0 0.0 2.9 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]
112 2 root SWN 0 0.0 0.0 [uksmd]

As you can see your values don't save much Ram...

With my values after main scan uksmd doesn't use much CPU % even I consider it as High....

Anyway, in LuPuS v17 kernel there will be 3 settings, LOW 5000 / 100, MEDIUM 5000 / 60 (recom. by CTCaer), HIGH 10000 / 100

+ optional uksm_service to turn off uksm on screen off

and that is what I use HIGH (10000/100) + uksm_service

---------- Post added at 08:08 PM ---------- Previous post was at 08:02 PM ----------

@cx-11 CODE TAGS AREN'T THERE FOR ADMIRATION YET FOR USE