How to max out performance EC2 instance












2















Disclaimer: I am a front end dev in a server kind of world.



Hi guys. I have a server instance on EC2, the c5d.9xlarge, whose specs are:




  • System: Ubuntu 18.04

  • vCPU: 36 threads/cores

  • Memory: 72 GB

  • Storage: 900 GB NVMe SSD

  • Dedicated EBS Bandwidth: 7,000 Mbps

  • Network Performance: 10 Gbps


Scenario: I use this server to upload large videos (4K, 1+ hr) and process them using FFMPEG but compared to my previous UpCloud server with 12 cores and 48 GB of RAM, this EC2 server is taking 1.5 times longer to upload and process, which I think should not be the case.



Question: How do I max out the performance for what I'm paying for?










share|improve this question









New contributor




Martavis P. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    2















    Disclaimer: I am a front end dev in a server kind of world.



    Hi guys. I have a server instance on EC2, the c5d.9xlarge, whose specs are:




    • System: Ubuntu 18.04

    • vCPU: 36 threads/cores

    • Memory: 72 GB

    • Storage: 900 GB NVMe SSD

    • Dedicated EBS Bandwidth: 7,000 Mbps

    • Network Performance: 10 Gbps


    Scenario: I use this server to upload large videos (4K, 1+ hr) and process them using FFMPEG but compared to my previous UpCloud server with 12 cores and 48 GB of RAM, this EC2 server is taking 1.5 times longer to upload and process, which I think should not be the case.



    Question: How do I max out the performance for what I'm paying for?










    share|improve this question









    New contributor




    Martavis P. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      2












      2








      2








      Disclaimer: I am a front end dev in a server kind of world.



      Hi guys. I have a server instance on EC2, the c5d.9xlarge, whose specs are:




      • System: Ubuntu 18.04

      • vCPU: 36 threads/cores

      • Memory: 72 GB

      • Storage: 900 GB NVMe SSD

      • Dedicated EBS Bandwidth: 7,000 Mbps

      • Network Performance: 10 Gbps


      Scenario: I use this server to upload large videos (4K, 1+ hr) and process them using FFMPEG but compared to my previous UpCloud server with 12 cores and 48 GB of RAM, this EC2 server is taking 1.5 times longer to upload and process, which I think should not be the case.



      Question: How do I max out the performance for what I'm paying for?










      share|improve this question









      New contributor




      Martavis P. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      Disclaimer: I am a front end dev in a server kind of world.



      Hi guys. I have a server instance on EC2, the c5d.9xlarge, whose specs are:




      • System: Ubuntu 18.04

      • vCPU: 36 threads/cores

      • Memory: 72 GB

      • Storage: 900 GB NVMe SSD

      • Dedicated EBS Bandwidth: 7,000 Mbps

      • Network Performance: 10 Gbps


      Scenario: I use this server to upload large videos (4K, 1+ hr) and process them using FFMPEG but compared to my previous UpCloud server with 12 cores and 48 GB of RAM, this EC2 server is taking 1.5 times longer to upload and process, which I think should not be the case.



      Question: How do I max out the performance for what I'm paying for?







      ubuntu amazon-web-services amazon-ec2






      share|improve this question









      New contributor




      Martavis P. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Martavis P. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 3 hours ago







      Martavis P.













      New contributor




      Martavis P. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 3 hours ago









      Martavis P.Martavis P.

      1114




      1114




      New contributor




      Martavis P. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Martavis P. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Martavis P. is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          2














          Your c5d.9xlarge comes with 900GB instance storage (aka ephemeral storage) - are you using that for storing and processing the files? While your instance has some dedicated EBS bandwidth the on-instance SSD storage will still be much faster. I suggest you use that for all source and temporary files and only store the results to EBS.



          There are some caveats with instance storage though:




          1. You have to format and mount it before it can be used. Refer to this answer for more details: Automatically mount SSD instance storage on AWS EC2 in Ubuntu 16.04


          2. The contents is wiped when you stop and re-start the instance. It survives reboot but not stop/start.





          Update: By default the SSD isn't mounted - you'll have to follow the steps in the linked answer above to make use of it. In the standard config after boot you'll be using the EBS which is slower than SSD.



          Then you will have to make sure that you're actually using it - set the upload, working and temporary directory to that SSD mount point.



          Or even better - since you've got 72 GB of RAM - create a RAM disk and and use that for temporary files. That will be even faster than SSD (if the files fit).



          First of all disregard the upload speed and optimise the processing - upload the file to EBS and time the processing, then upload to SSD and time it and then to RAM disk and time the processing. See how much they differ.



          Upload speed will be affected by many aspects, including the distance and latency between you and the AWS region you're uploading to. Are you using an AWS region close to you?



          Re CPU performance - you've got 36 CPUs available, however each single core may be slower than the cores in your previous 12-core machine. It depends on the CPU architecture and clock speed. However if you can parallelise the video processing into 36 threads you should be better off on this instance. If you rely on a single thread you may not get the performance you want.



          Hope that helps :)






          share|improve this answer


























          • Yes, the hard drive is used for storing while the files are processing and the files are temp until the process finishes. Resulting files are sent to S3. I actually don't know if the SSD is mounted either. I'm starting to realize that AWS doesn't use the specs as a default setting. Does mounting an SSD make the upload faster? Follow up: any ideas how I can max out the allowed CPU spec as well?

            – Martavis P.
            3 hours ago











          • @MartavisP. added some updates to the answer.

            – MLu
            2 hours ago











          • Wow, thank you so much for the information! I will study and apply what you've written.

            – Martavis P.
            2 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',
          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
          });


          }
          });






          Martavis P. is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f952318%2fhow-to-max-out-performance-ec2-instance%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          Your c5d.9xlarge comes with 900GB instance storage (aka ephemeral storage) - are you using that for storing and processing the files? While your instance has some dedicated EBS bandwidth the on-instance SSD storage will still be much faster. I suggest you use that for all source and temporary files and only store the results to EBS.



          There are some caveats with instance storage though:




          1. You have to format and mount it before it can be used. Refer to this answer for more details: Automatically mount SSD instance storage on AWS EC2 in Ubuntu 16.04


          2. The contents is wiped when you stop and re-start the instance. It survives reboot but not stop/start.





          Update: By default the SSD isn't mounted - you'll have to follow the steps in the linked answer above to make use of it. In the standard config after boot you'll be using the EBS which is slower than SSD.



          Then you will have to make sure that you're actually using it - set the upload, working and temporary directory to that SSD mount point.



          Or even better - since you've got 72 GB of RAM - create a RAM disk and and use that for temporary files. That will be even faster than SSD (if the files fit).



          First of all disregard the upload speed and optimise the processing - upload the file to EBS and time the processing, then upload to SSD and time it and then to RAM disk and time the processing. See how much they differ.



          Upload speed will be affected by many aspects, including the distance and latency between you and the AWS region you're uploading to. Are you using an AWS region close to you?



          Re CPU performance - you've got 36 CPUs available, however each single core may be slower than the cores in your previous 12-core machine. It depends on the CPU architecture and clock speed. However if you can parallelise the video processing into 36 threads you should be better off on this instance. If you rely on a single thread you may not get the performance you want.



          Hope that helps :)






          share|improve this answer


























          • Yes, the hard drive is used for storing while the files are processing and the files are temp until the process finishes. Resulting files are sent to S3. I actually don't know if the SSD is mounted either. I'm starting to realize that AWS doesn't use the specs as a default setting. Does mounting an SSD make the upload faster? Follow up: any ideas how I can max out the allowed CPU spec as well?

            – Martavis P.
            3 hours ago











          • @MartavisP. added some updates to the answer.

            – MLu
            2 hours ago











          • Wow, thank you so much for the information! I will study and apply what you've written.

            – Martavis P.
            2 hours ago


















          2














          Your c5d.9xlarge comes with 900GB instance storage (aka ephemeral storage) - are you using that for storing and processing the files? While your instance has some dedicated EBS bandwidth the on-instance SSD storage will still be much faster. I suggest you use that for all source and temporary files and only store the results to EBS.



          There are some caveats with instance storage though:




          1. You have to format and mount it before it can be used. Refer to this answer for more details: Automatically mount SSD instance storage on AWS EC2 in Ubuntu 16.04


          2. The contents is wiped when you stop and re-start the instance. It survives reboot but not stop/start.





          Update: By default the SSD isn't mounted - you'll have to follow the steps in the linked answer above to make use of it. In the standard config after boot you'll be using the EBS which is slower than SSD.



          Then you will have to make sure that you're actually using it - set the upload, working and temporary directory to that SSD mount point.



          Or even better - since you've got 72 GB of RAM - create a RAM disk and and use that for temporary files. That will be even faster than SSD (if the files fit).



          First of all disregard the upload speed and optimise the processing - upload the file to EBS and time the processing, then upload to SSD and time it and then to RAM disk and time the processing. See how much they differ.



          Upload speed will be affected by many aspects, including the distance and latency between you and the AWS region you're uploading to. Are you using an AWS region close to you?



          Re CPU performance - you've got 36 CPUs available, however each single core may be slower than the cores in your previous 12-core machine. It depends on the CPU architecture and clock speed. However if you can parallelise the video processing into 36 threads you should be better off on this instance. If you rely on a single thread you may not get the performance you want.



          Hope that helps :)






          share|improve this answer


























          • Yes, the hard drive is used for storing while the files are processing and the files are temp until the process finishes. Resulting files are sent to S3. I actually don't know if the SSD is mounted either. I'm starting to realize that AWS doesn't use the specs as a default setting. Does mounting an SSD make the upload faster? Follow up: any ideas how I can max out the allowed CPU spec as well?

            – Martavis P.
            3 hours ago











          • @MartavisP. added some updates to the answer.

            – MLu
            2 hours ago











          • Wow, thank you so much for the information! I will study and apply what you've written.

            – Martavis P.
            2 hours ago
















          2












          2








          2







          Your c5d.9xlarge comes with 900GB instance storage (aka ephemeral storage) - are you using that for storing and processing the files? While your instance has some dedicated EBS bandwidth the on-instance SSD storage will still be much faster. I suggest you use that for all source and temporary files and only store the results to EBS.



          There are some caveats with instance storage though:




          1. You have to format and mount it before it can be used. Refer to this answer for more details: Automatically mount SSD instance storage on AWS EC2 in Ubuntu 16.04


          2. The contents is wiped when you stop and re-start the instance. It survives reboot but not stop/start.





          Update: By default the SSD isn't mounted - you'll have to follow the steps in the linked answer above to make use of it. In the standard config after boot you'll be using the EBS which is slower than SSD.



          Then you will have to make sure that you're actually using it - set the upload, working and temporary directory to that SSD mount point.



          Or even better - since you've got 72 GB of RAM - create a RAM disk and and use that for temporary files. That will be even faster than SSD (if the files fit).



          First of all disregard the upload speed and optimise the processing - upload the file to EBS and time the processing, then upload to SSD and time it and then to RAM disk and time the processing. See how much they differ.



          Upload speed will be affected by many aspects, including the distance and latency between you and the AWS region you're uploading to. Are you using an AWS region close to you?



          Re CPU performance - you've got 36 CPUs available, however each single core may be slower than the cores in your previous 12-core machine. It depends on the CPU architecture and clock speed. However if you can parallelise the video processing into 36 threads you should be better off on this instance. If you rely on a single thread you may not get the performance you want.



          Hope that helps :)






          share|improve this answer















          Your c5d.9xlarge comes with 900GB instance storage (aka ephemeral storage) - are you using that for storing and processing the files? While your instance has some dedicated EBS bandwidth the on-instance SSD storage will still be much faster. I suggest you use that for all source and temporary files and only store the results to EBS.



          There are some caveats with instance storage though:




          1. You have to format and mount it before it can be used. Refer to this answer for more details: Automatically mount SSD instance storage on AWS EC2 in Ubuntu 16.04


          2. The contents is wiped when you stop and re-start the instance. It survives reboot but not stop/start.





          Update: By default the SSD isn't mounted - you'll have to follow the steps in the linked answer above to make use of it. In the standard config after boot you'll be using the EBS which is slower than SSD.



          Then you will have to make sure that you're actually using it - set the upload, working and temporary directory to that SSD mount point.



          Or even better - since you've got 72 GB of RAM - create a RAM disk and and use that for temporary files. That will be even faster than SSD (if the files fit).



          First of all disregard the upload speed and optimise the processing - upload the file to EBS and time the processing, then upload to SSD and time it and then to RAM disk and time the processing. See how much they differ.



          Upload speed will be affected by many aspects, including the distance and latency between you and the AWS region you're uploading to. Are you using an AWS region close to you?



          Re CPU performance - you've got 36 CPUs available, however each single core may be slower than the cores in your previous 12-core machine. It depends on the CPU architecture and clock speed. However if you can parallelise the video processing into 36 threads you should be better off on this instance. If you rely on a single thread you may not get the performance you want.



          Hope that helps :)







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 hours ago

























          answered 3 hours ago









          MLuMLu

          7,61712040




          7,61712040













          • Yes, the hard drive is used for storing while the files are processing and the files are temp until the process finishes. Resulting files are sent to S3. I actually don't know if the SSD is mounted either. I'm starting to realize that AWS doesn't use the specs as a default setting. Does mounting an SSD make the upload faster? Follow up: any ideas how I can max out the allowed CPU spec as well?

            – Martavis P.
            3 hours ago











          • @MartavisP. added some updates to the answer.

            – MLu
            2 hours ago











          • Wow, thank you so much for the information! I will study and apply what you've written.

            – Martavis P.
            2 hours ago





















          • Yes, the hard drive is used for storing while the files are processing and the files are temp until the process finishes. Resulting files are sent to S3. I actually don't know if the SSD is mounted either. I'm starting to realize that AWS doesn't use the specs as a default setting. Does mounting an SSD make the upload faster? Follow up: any ideas how I can max out the allowed CPU spec as well?

            – Martavis P.
            3 hours ago











          • @MartavisP. added some updates to the answer.

            – MLu
            2 hours ago











          • Wow, thank you so much for the information! I will study and apply what you've written.

            – Martavis P.
            2 hours ago



















          Yes, the hard drive is used for storing while the files are processing and the files are temp until the process finishes. Resulting files are sent to S3. I actually don't know if the SSD is mounted either. I'm starting to realize that AWS doesn't use the specs as a default setting. Does mounting an SSD make the upload faster? Follow up: any ideas how I can max out the allowed CPU spec as well?

          – Martavis P.
          3 hours ago





          Yes, the hard drive is used for storing while the files are processing and the files are temp until the process finishes. Resulting files are sent to S3. I actually don't know if the SSD is mounted either. I'm starting to realize that AWS doesn't use the specs as a default setting. Does mounting an SSD make the upload faster? Follow up: any ideas how I can max out the allowed CPU spec as well?

          – Martavis P.
          3 hours ago













          @MartavisP. added some updates to the answer.

          – MLu
          2 hours ago





          @MartavisP. added some updates to the answer.

          – MLu
          2 hours ago













          Wow, thank you so much for the information! I will study and apply what you've written.

          – Martavis P.
          2 hours ago







          Wow, thank you so much for the information! I will study and apply what you've written.

          – Martavis P.
          2 hours ago












          Martavis P. is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Martavis P. is a new contributor. Be nice, and check out our Code of Conduct.













          Martavis P. is a new contributor. Be nice, and check out our Code of Conduct.












          Martavis P. is a new contributor. Be nice, and check out our Code of Conduct.
















          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%2f952318%2fhow-to-max-out-performance-ec2-instance%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

          A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

          Calculate evaluation metrics using cross_val_predict sklearn

          Insert data from modal to MySQL (multiple modal on website)