1

My application creates cache for read/write inside my OS drive, which is slow, so I have mounted tmpfs and created a directory inside it. Then I created a symlink at the path on the slow drive where the caches are created, pointing at the tmpfs directory.

I want to know if my app does a lot of read/write using the symlink, is it going to affect tmpfs or OS drive performance?

My partitions are:

tmpfs /cache/dp/
/dev/sda3 /  <-- subdir /this/is/location

I created the symlink with:

ln -s /cache/dp /this/is/location
  • Symlinks only record the name of their target, nothing else. Are you just using the tmpfs as a cache of names or hoping for more? – Philip Couling Aug 23 '19 at 8:15
  • @PhilipCouling My app will do heavy read/write inside the symlink directory because I cannot change paths inside my app. I want to know if it will still use my slow OS disk I/O with same old performance or is it going to use tmpfs I/O and gives faster result? – Ted Khi Aug 23 '19 at 8:23
  • Could you edit in 1) the command used to create the link, and 2) the paths of the two mount points of the system drive & tmpfs? – Michael Homer Aug 23 '19 at 8:49
  • @MichaelHomer I haved edited my question – Ted Khi Aug 23 '19 at 9:33
  • Also, how about if I mount /this/is/location to tmpfs rather than symlinking? Is this a better solution? Or can I use bind mount /this/is/location to tmpfs /cache/dp directory? – Ted Khi Aug 23 '19 at 9:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.