console icon indicating copy to clipboard operation
console copied to clipboard

docker container resource requests and limits

Open uzdik-student opened this issue 1 year ago • 5 comments

https://hub.docker.com/r/redpandadata/console We use the above docker image to run redpanda-console as a pod in kubernetes cluster, as you can see from the screenshot, we have 107308070 messages in our topic, everything works fine until we select START OFFSET = Oldest:

Screenshot 2024-06-08 at 15 13 05

It starts consuming messages from the beginning and stops after several seconds with the following error:

Screenshot 2024-06-08 at 15 25 41

From the logs, we can see that the pod was restarted 5 seconds after redpanda started consuming messages.

Screenshot 2024-06-08 at 15 33 00

Here are the requests and limits we set for our pod:

Limits:
  cpu:     100m
  memory:  700Mi
Requests:
  cpu:      50m
  memory:   600Mi

Could that be the reason of pod restarts? What are the recommended memory and cpu limits for redpanda-console container?

uzdik-student avatar Jun 08 '24 10:06 uzdik-student

Hey @arman-sydikov , yes the resource constraints may be the reason. I'd recommend 2Gi of Memory and a burstable CPU configuration, since the only resource intensive task is a message search such as you were performing. If acceptable in your environment, you may want to remove the CPU limit entirely, but a limit of 1vCPU sounds reasonable too. The number of messages it can process per second is likely to be CPU bound. In our experience it is around ~50k messages / second for each core that it can use.

weeco avatar Jun 08 '24 15:06 weeco

@weeco

thank you for the advise, I have increased the limits to 2 cpu and 2.5Gi memory

Limits:
  cpu:     2
  memory:  2560Mi
Requests:
  cpu:      50m
  memory:   50Mi

now it doesn't restart, but stops after consuming about 45 Gib / 50 million messages with the following error:

Screenshot 2024-06-09 at 09 12 33

uzdik-student avatar Jun 09 '24 04:06 uzdik-student

What Console version are you using?

weeco avatar Jun 09 '24 14:06 weeco

What Console version are you using?

Redpanda Console (Platform Version v24.1) (built May 30, 2024) 788406B

uzdik-student avatar Jun 11 '24 18:06 uzdik-student

Can you tell how long this search was running? I think we have some hardcoded upper limit like 35minutes or so.

weeco avatar Jun 11 '24 20:06 weeco