https://github.com/jflambert/hasura-memory-consumption
https://github.com/jflambert/hasura-memory-consumption
hasura-graphql-engine timescaledb
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jflambert/hasura-memory-consumption
- Owner: jflambert
- Created: 2020-05-27T17:27:58.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-02T14:45:06.000Z (almost 3 years ago)
- Last Synced: 2025-01-22T11:39:38.152Z (9 months ago)
- Topics: hasura-graphql-engine, timescaledb
- Language: Shell
- Size: 25.4 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hasura-memory-consumption
An attempt to characterize [Hasura's memory consumption](https://github.com/hasura/graphql-engine/issues/4077) when providing very large results.Launch hasura, postgresql and preload test data with:
`docker-compose up -d`
This should take a few minutes to complete (31 million rows will be created)
Monitor memory usage with:
`docker stats --format "table {{.Container}}\t{{.Name}}\t{{.CPUPerc}}\t{{.MemPerc}}\t{{.MemUsage}}"`
Once postgres completes loading the data (CPU usage should go down to 0%), run the bash script in another terminal:
`./query_hasura.sh`
This script requests 1.5 million rows every 5 seconds. You can start multiple instances of the script to accelerate the test. With 8 parallel scripts, results show that Hasura will climb between 4GB (1.2.2) and 8GB (1.3.3) of RAM consumption while Postgres mostly remains under 1GB.
After 12 hours, cancelling the script(s) will cause Postgres to go back down to ~100MB memory while Hasura remains at ~3GB (1.2.2) or ~1GB (1.3.3).
This has been observed with Hasura 1.2.2 to 1.3.3
*UPDATE*: This appears to have been fixed with the release of Hasura 2.0.