Does Linux tmpfs filesystem need the sync option?












5















I'm looking for info about mounting a tmpfs partition and sync option.
Sync makes the data beeing dumped onto the disk without beeing saved in cache.
This works with ext4 and other filesystems. I'm wondering is even a tmpfs partition needs the sync option to be specified or it is enabled by default since it is a RAM partition. In my option it would be odd if a ramdisk would be cached in RAM.



tmpfs /tmp tmpfs defaults,sync,noatime,nosuid,nodev,noexec,mode=0777,size=400M 0 0



In a tmpfs partition is sync enabled by default?










share|improve this question




















  • 2





    tmpfs is not backed by any partition in the first place.

    – kasperd
    Jan 13 at 15:56











  • exactly, let's change subject once again ;)

    – poige
    2 days ago
















5















I'm looking for info about mounting a tmpfs partition and sync option.
Sync makes the data beeing dumped onto the disk without beeing saved in cache.
This works with ext4 and other filesystems. I'm wondering is even a tmpfs partition needs the sync option to be specified or it is enabled by default since it is a RAM partition. In my option it would be odd if a ramdisk would be cached in RAM.



tmpfs /tmp tmpfs defaults,sync,noatime,nosuid,nodev,noexec,mode=0777,size=400M 0 0



In a tmpfs partition is sync enabled by default?










share|improve this question




















  • 2





    tmpfs is not backed by any partition in the first place.

    – kasperd
    Jan 13 at 15:56











  • exactly, let's change subject once again ;)

    – poige
    2 days ago














5












5








5








I'm looking for info about mounting a tmpfs partition and sync option.
Sync makes the data beeing dumped onto the disk without beeing saved in cache.
This works with ext4 and other filesystems. I'm wondering is even a tmpfs partition needs the sync option to be specified or it is enabled by default since it is a RAM partition. In my option it would be odd if a ramdisk would be cached in RAM.



tmpfs /tmp tmpfs defaults,sync,noatime,nosuid,nodev,noexec,mode=0777,size=400M 0 0



In a tmpfs partition is sync enabled by default?










share|improve this question
















I'm looking for info about mounting a tmpfs partition and sync option.
Sync makes the data beeing dumped onto the disk without beeing saved in cache.
This works with ext4 and other filesystems. I'm wondering is even a tmpfs partition needs the sync option to be specified or it is enabled by default since it is a RAM partition. In my option it would be odd if a ramdisk would be cached in RAM.



tmpfs /tmp tmpfs defaults,sync,noatime,nosuid,nodev,noexec,mode=0777,size=400M 0 0



In a tmpfs partition is sync enabled by default?







tmpfs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago









poige

6,83411337




6,83411337










asked Jan 13 at 13:38









Viktor JorasViktor Joras

324




324








  • 2





    tmpfs is not backed by any partition in the first place.

    – kasperd
    Jan 13 at 15:56











  • exactly, let's change subject once again ;)

    – poige
    2 days ago














  • 2





    tmpfs is not backed by any partition in the first place.

    – kasperd
    Jan 13 at 15:56











  • exactly, let's change subject once again ;)

    – poige
    2 days ago








2




2





tmpfs is not backed by any partition in the first place.

– kasperd
Jan 13 at 15:56





tmpfs is not backed by any partition in the first place.

– kasperd
Jan 13 at 15:56













exactly, let's change subject once again ;)

– poige
2 days ago





exactly, let's change subject once again ;)

– poige
2 days ago










2 Answers
2






active

oldest

votes


















7














I had to search a bit.
According to




man mount




The sync option is relevant only for a limited number of filesystems, not for tmpfs.



So the answer is: It does not matter, since it is ignored by tmpfs.






share|improve this answer































    4















    Sync makes the data beeing dumped onto the disk without beeing saved in cache




    "Standard" Linux manual states:



       sync   All I/O to the filesystem should be done synchronously.
    In the case of media with a limited number of write cycles
    (e.g. some flash drives), sync may cause life-cycle shortening.


    So it's not about cacheing but rather about durability. Writing synchronously doesn't mean there wouldn't be caching (for e. g., writethrough is well-known caching approach which is very different to writeback but both still are cacheing).




    In my option it would be odd if a ramdisk would be cached in RAM.




    As explained it doesn't prohibit cacheing but rather prohibits writeback-like behaviour. What would be odd is "durability" for RAM disk though.






    share|improve this answer



















    • 3





      It made a ton of sense on the 2.0 kernel ramdisk implementation, which actually did cache (I know crazy huh).

      – joshudson
      Jan 13 at 19:07











    • probably you misread it. tmpfs isn't block device which RAM-disk is. Also it's not about cache

      – poige
      Jan 14 at 2:57











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "2"
    };
    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',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f948829%2fdoes-linux-tmpfs-filesystem-need-the-sync-option%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    7














    I had to search a bit.
    According to




    man mount




    The sync option is relevant only for a limited number of filesystems, not for tmpfs.



    So the answer is: It does not matter, since it is ignored by tmpfs.






    share|improve this answer




























      7














      I had to search a bit.
      According to




      man mount




      The sync option is relevant only for a limited number of filesystems, not for tmpfs.



      So the answer is: It does not matter, since it is ignored by tmpfs.






      share|improve this answer


























        7












        7








        7







        I had to search a bit.
        According to




        man mount




        The sync option is relevant only for a limited number of filesystems, not for tmpfs.



        So the answer is: It does not matter, since it is ignored by tmpfs.






        share|improve this answer













        I had to search a bit.
        According to




        man mount




        The sync option is relevant only for a limited number of filesystems, not for tmpfs.



        So the answer is: It does not matter, since it is ignored by tmpfs.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 13 at 14:53









        NilsNils

        6,62222162




        6,62222162

























            4















            Sync makes the data beeing dumped onto the disk without beeing saved in cache




            "Standard" Linux manual states:



               sync   All I/O to the filesystem should be done synchronously.
            In the case of media with a limited number of write cycles
            (e.g. some flash drives), sync may cause life-cycle shortening.


            So it's not about cacheing but rather about durability. Writing synchronously doesn't mean there wouldn't be caching (for e. g., writethrough is well-known caching approach which is very different to writeback but both still are cacheing).




            In my option it would be odd if a ramdisk would be cached in RAM.




            As explained it doesn't prohibit cacheing but rather prohibits writeback-like behaviour. What would be odd is "durability" for RAM disk though.






            share|improve this answer



















            • 3





              It made a ton of sense on the 2.0 kernel ramdisk implementation, which actually did cache (I know crazy huh).

              – joshudson
              Jan 13 at 19:07











            • probably you misread it. tmpfs isn't block device which RAM-disk is. Also it's not about cache

              – poige
              Jan 14 at 2:57
















            4















            Sync makes the data beeing dumped onto the disk without beeing saved in cache




            "Standard" Linux manual states:



               sync   All I/O to the filesystem should be done synchronously.
            In the case of media with a limited number of write cycles
            (e.g. some flash drives), sync may cause life-cycle shortening.


            So it's not about cacheing but rather about durability. Writing synchronously doesn't mean there wouldn't be caching (for e. g., writethrough is well-known caching approach which is very different to writeback but both still are cacheing).




            In my option it would be odd if a ramdisk would be cached in RAM.




            As explained it doesn't prohibit cacheing but rather prohibits writeback-like behaviour. What would be odd is "durability" for RAM disk though.






            share|improve this answer



















            • 3





              It made a ton of sense on the 2.0 kernel ramdisk implementation, which actually did cache (I know crazy huh).

              – joshudson
              Jan 13 at 19:07











            • probably you misread it. tmpfs isn't block device which RAM-disk is. Also it's not about cache

              – poige
              Jan 14 at 2:57














            4












            4








            4








            Sync makes the data beeing dumped onto the disk without beeing saved in cache




            "Standard" Linux manual states:



               sync   All I/O to the filesystem should be done synchronously.
            In the case of media with a limited number of write cycles
            (e.g. some flash drives), sync may cause life-cycle shortening.


            So it's not about cacheing but rather about durability. Writing synchronously doesn't mean there wouldn't be caching (for e. g., writethrough is well-known caching approach which is very different to writeback but both still are cacheing).




            In my option it would be odd if a ramdisk would be cached in RAM.




            As explained it doesn't prohibit cacheing but rather prohibits writeback-like behaviour. What would be odd is "durability" for RAM disk though.






            share|improve this answer














            Sync makes the data beeing dumped onto the disk without beeing saved in cache




            "Standard" Linux manual states:



               sync   All I/O to the filesystem should be done synchronously.
            In the case of media with a limited number of write cycles
            (e.g. some flash drives), sync may cause life-cycle shortening.


            So it's not about cacheing but rather about durability. Writing synchronously doesn't mean there wouldn't be caching (for e. g., writethrough is well-known caching approach which is very different to writeback but both still are cacheing).




            In my option it would be odd if a ramdisk would be cached in RAM.




            As explained it doesn't prohibit cacheing but rather prohibits writeback-like behaviour. What would be odd is "durability" for RAM disk though.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jan 13 at 15:45









            poigepoige

            6,83411337




            6,83411337








            • 3





              It made a ton of sense on the 2.0 kernel ramdisk implementation, which actually did cache (I know crazy huh).

              – joshudson
              Jan 13 at 19:07











            • probably you misread it. tmpfs isn't block device which RAM-disk is. Also it's not about cache

              – poige
              Jan 14 at 2:57














            • 3





              It made a ton of sense on the 2.0 kernel ramdisk implementation, which actually did cache (I know crazy huh).

              – joshudson
              Jan 13 at 19:07











            • probably you misread it. tmpfs isn't block device which RAM-disk is. Also it's not about cache

              – poige
              Jan 14 at 2:57








            3




            3





            It made a ton of sense on the 2.0 kernel ramdisk implementation, which actually did cache (I know crazy huh).

            – joshudson
            Jan 13 at 19:07





            It made a ton of sense on the 2.0 kernel ramdisk implementation, which actually did cache (I know crazy huh).

            – joshudson
            Jan 13 at 19:07













            probably you misread it. tmpfs isn't block device which RAM-disk is. Also it's not about cache

            – poige
            Jan 14 at 2:57





            probably you misread it. tmpfs isn't block device which RAM-disk is. Also it's not about cache

            – poige
            Jan 14 at 2:57


















            draft saved

            draft discarded




















































            Thanks for contributing an answer to Server Fault!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f948829%2fdoes-linux-tmpfs-filesystem-need-the-sync-option%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How did Captain America manage to do this?

            迪纳利

            南乌拉尔铁路局