Very less CPU Usage and less QPS
- 主要语言
- Go
- 星标
- 10.8k
- 派生
- 1.3k
- 平均合并
- 2 天 36 分钟
- 30 天内合并 PR
- 26
描述
Hi,
gqlgen version - v0.17.36
Pods - 10
CPU - 1
Mem - 1 GB
I am building an API server with Clickhouse database using gqlgen package.
The schema I am using just 2 and with straight 6 keys without any nested schema.
My API server deployed in kubernetes.
I am trying to hit around 50K QPS since I have 10 CPU cores running with big Clickhouse cluster running in background.
But I am able to hit only 5K QPS and my cpu usage is very less with just 1.5 but the average response time seems max 150ms.
I want to scale the system up to receive more QPS, I am not sure if I am missing something with http connections or need some special configurations.Also, I should be able to generate more QPS in future.
But my CPU is not at all utilising more than 10%, need some help to maximise the performance.
Thanks in advance!
贡献指南
调研方向
该 issue 描述了一个基于 gqlgen、使用 Clickhouse 的 API 服务器存在 CPU 利用率和 QPS 偏低的问题。首先检查服务器的 HTTP 配置、连接池以及 gqlgen 执行设置。查找 GraphQL resolver 代码和数据库查询中的性能瓶颈。要确定根本原因,需要对应用程序进行性能分析并检查 Kubernetes 资源限制。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- clickhouse, go, graphql, kubernetes
- 领域
- backend, performance
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100