Data transfer speeds from S3 bucket -> EC2 SLURM cluster are slower than S3 bucket -> Google SLURM cluster

0

Hello, I am currently benchmarking big data multi-cloud transfer speeds at a range of parallel reads using a cluster of EC2 instances & similar Google machines. I first detected an issue when using a c5n.2xlarge EC2 instance for my worker nodes reading a 7 GB dataset in multiple formats from an S3 bucket. I have verified that the bucket is in the same cloud region as the EC2 nodes, but the data transfer executed far slower to EC2 instances than it did for GCP. The data is not going into EBS, rather being read in-memory, where the data chunks are then removed from memory when the process is complete. Here are a list of things I have tried to diagnose the problem:

  1. Upgrading to a bigger instance type. I am aware that there is a network bandwidth limit to each instance type, and I saw a read speed increase when I changed to a c5n.9xlarge (From your documentation, there should be 50 Gpbs of bandwidth), but it was still slower than reading from S3 to a Google VM with larger network proximity. I also upgraded instance type again, but there little to no speed increase. Note that hyperthreading is turned off for each EC2 instance.
  2. Changing the S3 bucket parameter max_concurrent_requests to 100. I am using python to benchmark these speeds, so this parameter was passed into a storage_options dictionary that is used in different remote data access APIs (see the Dask documentation for more info). Editing this parameter had absolutely no effect on the transfer speeds.
  3. Verified that enhanced networking is active on all worker nodes & controller node.
  4. Performed the data transfer directly from a worker node command line for both AWS and GCP machines. This was done to rule out my testing code being at fault, and the results were the same: S3 -> EC2 was slower than S3-> GCP.
  5. Varying how many cores of each EC2 instance were used in each SLURM job. For the Google machines, each worker node has 4 cores and 16 GB memory, so each job that I submit there takes up an entire node. However, when I had to upgrade my EC2 worker node instances, there are clearly more cores than just 4 per node. To try and maintain a fair comparison, I configured each SLURM job to only access 8 cores per node in my EC2 cluster (I am performing 40 parallel reads at maximum, so if my understanding is correct each node will have 8 separate data stream connections, with 5 total nodes being active at a time with c5n.9xlarge instances). I also tried seeing if allocating all of a node's resources for my 40 parallel reads would speed things up (2 instances with all 18 cores in each active, and a third worker instance with only 4 cores active), but there was no effect.

I'm fairly confident there is a solution to this, but I am having an extremely difficult time figuring out what it is. I know that setting an endpoint shouldn't be the problem, because GCP is faster than EC2 and there is egress occurring there. Any help would be appreciated, because I want to make sure I get an accurate picture of S3->EC2 before presenting my work. Please let me know if more information is needed!

1 Answer
1

Have you considered setting up an S3 Gateway endpoint (https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-s3.html) or a private link endpoint (https://docs.aws.amazon.com/AmazonS3/latest/userguide/privatelink-interface-endpoints.html) to optimize the networking? Gateway endpoints are no cost where private link has a cost.

AWS
answered 2 years ago
  • Thanks for the response! I have not set those up yet, but that was something that I was looking at. Would I have to create a separate endpoint for each instance in my cluster?

  • Nope! You would set it up to have one gateway or endpoint for the entire VPC.

  • Just set up the gateway endpoint yesterday, and I saw a very minimal speed increase (basically nonexistent); I will double check all of the setup steps to make sure something wasn't missed. Is there anything else I could try? I will be shocked if GCP is truly faster from S3 than an EC2 cluster.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions