简体   繁体   中英

Amazon EC2 -> S3 traffic limit

My Amazon EC2 (Windows / t2.Large) server uploads ~200K files to S3 (bucket is in the same region as the server). After a few hours of ~100 files a minute the upload slows down to ~30 files a minute with no obvious reason. Pausing the process for a few hours will make it go fast again. Does Amazon put a limit on this traffic? Any other reason for the speed loss?

Here is my upload code:

        string S3_KEY = S3TargetFileName;

        S3_KEY = S3FolderName + "/" + S3_KEY;

        S3_KEY = S3_KEY.ToLower();
        PutObjectRequest request = new PutObjectRequest()
        {
            CannedACL = S3CannedACL.PublicRead,
            BucketName = BucketName,
            Key = S3_KEY,
            FilePath = LocalFullPath
        };
        var client = GetS3Client();
        client.PutObject(request);

You have probably run out of CPU credits for your instance. The T2 instances are Burstable Performance Instances . Once your CPU credits are depleted, you will experience a slowdown.

You can see your CPU Credit Balance from the EC2 console (select your instance, then go to the Monitoring tab). It should probably near zero now.

For sustained workloads that should not be slowed down, you should switch to a different family of instances that are not burstable (eg the M4 family).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM