ecdye / zram-config

A complete zram-config utility for swap, directories, and logs to reduce SD, NAND and eMMC block wear.
MIT License
412 stars 53 forks source link

Confused about page-cache setting #38

Closed wanton7 closed 4 years ago

wanton7 commented 4 years ago

I'm no Linux expert and I tried to search information about page-cache setting that you mention in README.md and at https://github.com/StuartIanNaylor/zram-config/tree/master/swap-performance . But I couldn't find any setting named like that by googling. How do I set page-cache to 0 in Ubuntu?

StuartIanNaylor commented 4 years ago

Already does it for you in the ztab

# swap  alg mem_limit   disk_size   swap_priority   page-cluster    swappiness
swap    lz4 250M        750M        75      0       80

page_cluster is set to 0 by default, my bad terminology the default is 3 which caches the cluster in 8s from memory, 2=4s, 1=2s, 0=no cache instant write. It will effect disk swap performance but that isn't the assumption of using zram memory based swap..

wanton7 commented 4 years ago

Ok thanks, I didn't understand page-cache settings means vm.pagecluster. From reading documents about it, I thought it only effects reads from swap not page writes.