Can the memory checked inside the ecs fargate and the memory of the task definition be different?

0

I set 1 vcpu/ 2 memory in task definition in aws ecs fargate.

To check the memory of the app inside, I accessed the container directly through the aws exceute command and checked the memory through free and top, but it was set to 8gb. Why did this happen?

joker
질문됨 일 년 전447회 조회
1개 답변
1
수락된 답변

, it's possible that you're seeing the total memory available to the underlying infrastructure (the EC2 instance) rather than the memory limit set for your specific Fargate task. Fargate abstracts the underlying server infrastructure, but when you run commands like free or top inside a container, they report information about the underlying host, not the individual container.

The memory value that you set in the task definition is used by AWS to allocate resources and to enforce memory limits, but it might not be directly visible inside the container using tools like free or top.

To investigate further, you might consider monitoring the memory usage of your task using CloudWatch, or looking into container-level monitoring tools which are designed to report metrics in a containerized environment.

profile picture
전문가
답변함 일 년 전
profile picture
전문가
검토됨 11일 전
profile picture
전문가
검토됨 한 달 전
  • I said " it's possible that you're seeing the total memory available to the underlying infrastructure (the EC2 instance) ", but I don't understand the "infrastructure (the EC2 instance)" part, so I have an additional question. Can you say that infrastructure (the EC2 instance) is the server that actually operated fargate? fargate is confusing me as it doesn't use ec2 services.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠