Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have started tuning a bit Linux VM performance on my system (yes. I know that vm.swappiness=0 will kill kittens but I found 30-40 as much better for me as it improved my latency - probably at cost of throughput). I would like to ask how the tmpfs is counted (is it cache or program) for purpose of swapping and vm.swappiness.

To give higher level I need a folder which:

  • Usually is empty but usage might increase to up to 8x my main memory size
  • Do not need to be preserved about reboots
  • Is low priority as far as I/O is concerned (i.e. programs using it might wait) but it would be nice if it was fast

Currently I'm using a normal FS. I heard (not tested) about problems with large tmpfs pushing the data on swap. Since I assume that tests were done with default vm.swappiness=60 and tmpfs is simply occupying only cache the decreased vm.swappiness would make it easier swappable during memory pressure. Am I correct?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

tmpfs is implemented as cache pages, so a low value for vm.swappiness will make tmpfs files more likely to be swapped out, since the system will favor stealing cache pages over application pages.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.