How to reduce IO wait when serving large static files on NGINX?

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











up vote
1
down vote

favorite












I am wondering how to setup NGINX to server large (1-4 GB) static files without killing disk I/O wait caused by simultaneous reading.
How do file-servers achieve this?










share|improve this question

























    up vote
    1
    down vote

    favorite












    I am wondering how to setup NGINX to server large (1-4 GB) static files without killing disk I/O wait caused by simultaneous reading.
    How do file-servers achieve this?










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am wondering how to setup NGINX to server large (1-4 GB) static files without killing disk I/O wait caused by simultaneous reading.
      How do file-servers achieve this?










      share|improve this question













      I am wondering how to setup NGINX to server large (1-4 GB) static files without killing disk I/O wait caused by simultaneous reading.
      How do file-servers achieve this?







      nginx






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 5 hours ago









      Michael Rogers

      268




      268




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          These are would help you to reduce I/O on Disk:



          1. Turn on sendfilein NGINX.

          2. Use VFS File System for your partition.

          3. Adjust output_buffers in NGINX.

          4. Disable directio in NGINX.





          share|improve this answer




















          • Thanks! Are these still valid if NGINX is used as reverse proxy or not? Because i did not consider that, i might need to remove Apache altogether first.
            – Michael Rogers
            5 hours ago











          • These are important when you use NGINX as a standalone web server or reverse proxy. For reversed proxied NGINX you must adjust some variables for proxy_*. such as proxy_buffering, proxy_buffer_size, etc..
            – Daniel Gordi
            5 hours ago










          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',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          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%2fserverfault.com%2fquestions%2f935482%2fhow-to-reduce-io-wait-when-serving-large-static-files-on-nginx%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          These are would help you to reduce I/O on Disk:



          1. Turn on sendfilein NGINX.

          2. Use VFS File System for your partition.

          3. Adjust output_buffers in NGINX.

          4. Disable directio in NGINX.





          share|improve this answer




















          • Thanks! Are these still valid if NGINX is used as reverse proxy or not? Because i did not consider that, i might need to remove Apache altogether first.
            – Michael Rogers
            5 hours ago











          • These are important when you use NGINX as a standalone web server or reverse proxy. For reversed proxied NGINX you must adjust some variables for proxy_*. such as proxy_buffering, proxy_buffer_size, etc..
            – Daniel Gordi
            5 hours ago














          up vote
          2
          down vote



          accepted










          These are would help you to reduce I/O on Disk:



          1. Turn on sendfilein NGINX.

          2. Use VFS File System for your partition.

          3. Adjust output_buffers in NGINX.

          4. Disable directio in NGINX.





          share|improve this answer




















          • Thanks! Are these still valid if NGINX is used as reverse proxy or not? Because i did not consider that, i might need to remove Apache altogether first.
            – Michael Rogers
            5 hours ago











          • These are important when you use NGINX as a standalone web server or reverse proxy. For reversed proxied NGINX you must adjust some variables for proxy_*. such as proxy_buffering, proxy_buffer_size, etc..
            – Daniel Gordi
            5 hours ago












          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          These are would help you to reduce I/O on Disk:



          1. Turn on sendfilein NGINX.

          2. Use VFS File System for your partition.

          3. Adjust output_buffers in NGINX.

          4. Disable directio in NGINX.





          share|improve this answer












          These are would help you to reduce I/O on Disk:



          1. Turn on sendfilein NGINX.

          2. Use VFS File System for your partition.

          3. Adjust output_buffers in NGINX.

          4. Disable directio in NGINX.






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 5 hours ago









          Daniel Gordi

          766




          766











          • Thanks! Are these still valid if NGINX is used as reverse proxy or not? Because i did not consider that, i might need to remove Apache altogether first.
            – Michael Rogers
            5 hours ago











          • These are important when you use NGINX as a standalone web server or reverse proxy. For reversed proxied NGINX you must adjust some variables for proxy_*. such as proxy_buffering, proxy_buffer_size, etc..
            – Daniel Gordi
            5 hours ago
















          • Thanks! Are these still valid if NGINX is used as reverse proxy or not? Because i did not consider that, i might need to remove Apache altogether first.
            – Michael Rogers
            5 hours ago











          • These are important when you use NGINX as a standalone web server or reverse proxy. For reversed proxied NGINX you must adjust some variables for proxy_*. such as proxy_buffering, proxy_buffer_size, etc..
            – Daniel Gordi
            5 hours ago















          Thanks! Are these still valid if NGINX is used as reverse proxy or not? Because i did not consider that, i might need to remove Apache altogether first.
          – Michael Rogers
          5 hours ago





          Thanks! Are these still valid if NGINX is used as reverse proxy or not? Because i did not consider that, i might need to remove Apache altogether first.
          – Michael Rogers
          5 hours ago













          These are important when you use NGINX as a standalone web server or reverse proxy. For reversed proxied NGINX you must adjust some variables for proxy_*. such as proxy_buffering, proxy_buffer_size, etc..
          – Daniel Gordi
          5 hours ago




          These are important when you use NGINX as a standalone web server or reverse proxy. For reversed proxied NGINX you must adjust some variables for proxy_*. such as proxy_buffering, proxy_buffer_size, etc..
          – Daniel Gordi
          5 hours ago

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f935482%2fhow-to-reduce-io-wait-when-serving-large-static-files-on-nginx%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          What does second last employer means? [closed]

          Installing NextGIS Connect into QGIS 3?

          One-line joke