Am I hammering my SSD by keeping a symlink on it?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












Instead of configuring my Nextcloud (Linux/Nginx/PGsql/PHP) server to look for a folder on my spinning hard drive mounted at /mnt/HDDfs/, I Sym-Linked /var/Nextcloud_Data so it points to /mnt/HDDfs/Nextcloud_Data and then pointed my Nextcloud config to /var/Nextcloud_Data. This way, if I ever decide to change the name of my mountpoint, I don't have to touch the DB, as I can simply edit the Symbolic Link.



At first it seemed like a great idea, but then I remembered that my root / drive is an SSD, which can only withstand limited wear compared to a traditional magnetic platter; even if wear by usage is marginal on nowadays' disks, hammering specific cells of a drive over and over isn't exactly the best idea.



What I'm asking is: when a program loads and/or writes to a location with a symlink in it, does the OS load the symlink every single time from the source location and then follow it to the real target and perform actions there or does it "cache" symlinks and translate /var/Nextcloud_Data/filename to /mnt/HDDfs/Nextcloud_Data/filename directly?



Additional info:



  • Operating system: Ubuntu Server 18.04 LTS with all latest patches and upgrades.

  • Disk Drives: a WD RED Hard Disk connected via SATA and a PCIe M.2 (Samsung 960 EVO) SSD.

  • File Systems: both the drives are GPT formatted with Ext4 file systems.

  • Motherboard: Asus Z170-Deluxe (a desktop board)








share

























    up vote
    0
    down vote

    favorite












    Instead of configuring my Nextcloud (Linux/Nginx/PGsql/PHP) server to look for a folder on my spinning hard drive mounted at /mnt/HDDfs/, I Sym-Linked /var/Nextcloud_Data so it points to /mnt/HDDfs/Nextcloud_Data and then pointed my Nextcloud config to /var/Nextcloud_Data. This way, if I ever decide to change the name of my mountpoint, I don't have to touch the DB, as I can simply edit the Symbolic Link.



    At first it seemed like a great idea, but then I remembered that my root / drive is an SSD, which can only withstand limited wear compared to a traditional magnetic platter; even if wear by usage is marginal on nowadays' disks, hammering specific cells of a drive over and over isn't exactly the best idea.



    What I'm asking is: when a program loads and/or writes to a location with a symlink in it, does the OS load the symlink every single time from the source location and then follow it to the real target and perform actions there or does it "cache" symlinks and translate /var/Nextcloud_Data/filename to /mnt/HDDfs/Nextcloud_Data/filename directly?



    Additional info:



    • Operating system: Ubuntu Server 18.04 LTS with all latest patches and upgrades.

    • Disk Drives: a WD RED Hard Disk connected via SATA and a PCIe M.2 (Samsung 960 EVO) SSD.

    • File Systems: both the drives are GPT formatted with Ext4 file systems.

    • Motherboard: Asus Z170-Deluxe (a desktop board)








    share























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Instead of configuring my Nextcloud (Linux/Nginx/PGsql/PHP) server to look for a folder on my spinning hard drive mounted at /mnt/HDDfs/, I Sym-Linked /var/Nextcloud_Data so it points to /mnt/HDDfs/Nextcloud_Data and then pointed my Nextcloud config to /var/Nextcloud_Data. This way, if I ever decide to change the name of my mountpoint, I don't have to touch the DB, as I can simply edit the Symbolic Link.



      At first it seemed like a great idea, but then I remembered that my root / drive is an SSD, which can only withstand limited wear compared to a traditional magnetic platter; even if wear by usage is marginal on nowadays' disks, hammering specific cells of a drive over and over isn't exactly the best idea.



      What I'm asking is: when a program loads and/or writes to a location with a symlink in it, does the OS load the symlink every single time from the source location and then follow it to the real target and perform actions there or does it "cache" symlinks and translate /var/Nextcloud_Data/filename to /mnt/HDDfs/Nextcloud_Data/filename directly?



      Additional info:



      • Operating system: Ubuntu Server 18.04 LTS with all latest patches and upgrades.

      • Disk Drives: a WD RED Hard Disk connected via SATA and a PCIe M.2 (Samsung 960 EVO) SSD.

      • File Systems: both the drives are GPT formatted with Ext4 file systems.

      • Motherboard: Asus Z170-Deluxe (a desktop board)








      share













      Instead of configuring my Nextcloud (Linux/Nginx/PGsql/PHP) server to look for a folder on my spinning hard drive mounted at /mnt/HDDfs/, I Sym-Linked /var/Nextcloud_Data so it points to /mnt/HDDfs/Nextcloud_Data and then pointed my Nextcloud config to /var/Nextcloud_Data. This way, if I ever decide to change the name of my mountpoint, I don't have to touch the DB, as I can simply edit the Symbolic Link.



      At first it seemed like a great idea, but then I remembered that my root / drive is an SSD, which can only withstand limited wear compared to a traditional magnetic platter; even if wear by usage is marginal on nowadays' disks, hammering specific cells of a drive over and over isn't exactly the best idea.



      What I'm asking is: when a program loads and/or writes to a location with a symlink in it, does the OS load the symlink every single time from the source location and then follow it to the real target and perform actions there or does it "cache" symlinks and translate /var/Nextcloud_Data/filename to /mnt/HDDfs/Nextcloud_Data/filename directly?



      Additional info:



      • Operating system: Ubuntu Server 18.04 LTS with all latest patches and upgrades.

      • Disk Drives: a WD RED Hard Disk connected via SATA and a PCIe M.2 (Samsung 960 EVO) SSD.

      • File Systems: both the drives are GPT formatted with Ext4 file systems.

      • Motherboard: Asus Z170-Deluxe (a desktop board)






      filesystems hard-disk symlink ext4 nextcloud





      share












      share










      share



      share










      asked 1 min ago









      alex2003super

      1063




      1063

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475145%2fam-i-hammering-my-ssd-by-keeping-a-symlink-on-it%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475145%2fam-i-hammering-my-ssd-by-keeping-a-symlink-on-it%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)