0.5.x Extremely slow server performance
- Dominant language
- Go
- Stars
- 9.8k
- Forks
- 912
- Avg merge
- 2h 35m
- Merged PRs (30d)
- 9
Description
**Gorse version**
0.5.4
**Describe the bug**
There's a huge difference in the API performance between version 0.4.x and 0.5.x.
**To Reproduce**
New setup: Gorse (master, worker, server) 0.5.4, Redis 8.6.0, MySQL 8.
Old setup: Gorse (master, worker, server) 0.4.16, Redis 8.6.0, MySQL 8.
Version 0.4.16 handles 300 rps on the API (POST /feedback and GET /recommend/xyz) with 3ms response time, while training.
Version 0.5.4 slows down to 900ms on POST /feedback, and 15s GET /recommend/xyz while training. Drops to normal 3ms when stopping "master" container.
**Expected behavior**
Performance should be similar across versions.
**Additional context**
- Server A: Gorse + Redis server with 88 cores, 1TB RAM
- Server B: MySQL Server with 56 cores, 750GB RAM
- About 12M feedbacks and 400k users per day. 40k items, +300 per day.
- Most settings on config.toml are set to default, except n_jobs, periods and cache
Contributor guide
Research direction
Start by reproducing the comparison against Gorse 0.4.16 and 0.5.4 using POST /feedback and GET /recommend/xyz while the master container is training. Review the master and server entry points plus config.toml, then profile the slow requests under the stated workload. Done means the 0.5.x API shows comparable response times without stopping master.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, mysql, redis
- Domain
- api, backend, databases, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100