Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to fully utilize current ec2 instance before creating new ec2 instance for multiple recordings concurrently #91

Open
shaheryar0129 opened this issue May 17, 2021 · 4 comments

Comments

@shaheryar0129
Copy link

shaheryar0129 commented May 17, 2021

I am trying to record multiple recordings of different meetings AT THE SAME TIME.For that im trying to fully utilize current ec2 instance,if the capacity fills up then it should create new one and so on.Whats happening now is when I try to record more than 1 meetings,it first gives me error reason: 'RESOURCE:CPU'..After some minutes auto scaling group automatically creates new instance than I get able to record two meetings.I am using t3.xlarge instance so it must have enough capacity to record multiple meetings..It creates upto five t3.xlarge instances.
I also want to remove this error reason: 'RESOURCE:CPU' instead show a loading or something until new instance gets created.I have tried with this solution comment but it doesn't help .Tried this with field="memory" and field="CPU" both.

my ec2 instances: instances
Here's my auto scaling group event logs:pic1 pic2

Please let me know if anything else required..Looking forward,Thanks.

@shaheryar0129 shaheryar0129 changed the title Unable to fully utilize current ec2 instance before creating new ec2 instance for multiple recordings Unable to fully utilize current ec2 instance before creating new ec2 instance for multiple recordings concurrently May 17, 2021
@anuranduttaroy
Copy link
Contributor

Hey @shaheryar0129

The t3.xlarge instance has 4vCPU and 16.0GB memory. For each recording task, we define some memory and CPU limits here in the AWS Cloudformation template e.g 4vCPU and 8GB of memory. This is the default value and you can change it according to how much your application needs.

Given that, if you use field="CPU" for "placementStrategy": "binpack" like I mentioned here #81 (comment), ECS would try to fit in the applications based on the reserved CPU units. e.g If you had mentioned 1 vCPU, ECS would try to fit in 4 tasks in 1 t3.xlarge instance as it as 4vCPU. Similarly, if you use field="memory", then ECS would look at the reserved memory params for your container. Here is a blog post on Amazon ECS Task Placement which might be helpful.

You might also want to set the autoscaling to scale up a bit early so that you have enough buffer to do additional scaling if required in case of a burst of recording request. One other way to solve this is to use ECS Service as mentioned in the FAQ#2 Point ii

Hope this helps.

@shaheryar0129
Copy link
Author

shaheryar0129 commented May 29, 2021

@anuranduttaroy I tried but it didn't worked.I have changed all of my CPU and memory related configuration to half and used field:CPU as my placementStrategy...So technically,each instance should be able to entertain two meetings at the same time but still it is creating separate ec2 instance for each meeting

Here is my placementStrategy: image

Here is my RecordingDemoCloudformationTemplate.yaml file changes: image

Here's my autoscaling group event logs: image

here's my forked repo ,you can see all the changes in this: https://github.com/shaheryar0129/amazon-chime-sdk-recording-demo.git

@shaheryar0129
Copy link
Author

@anuranduttaroy any update on this?

@tenge-amzn
Copy link

Chime SDK team has launched a new service to provide meeting capture capabilities with original video resolution and frame rate. You will not need to provision your own container infrastructure. Instead, just call the API from AWS SDK and provide a prepared S3 bucket to receive the artifacts.

To know more, please check out the blog:
https://aws.amazon.com/blogs/business-productivity/capture-amazon-chime-sdk-meetings-using-media-capture-pipelines/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants