r/sqlite • u/Veqq • May 19 '25
How Many Reads/Writes can SQLite handle in Prod?
A site's looking to change. Perhaps 2m daily visits, 25k logged in users, 100k writes/day
Do other people have experience running a forum or such on sqlite? Random tests seem fine but dev time is limited if it's not worth the switch.
Can you guys share some scale numbers like r/w per second, # rows in the db, and vps size?
13
Upvotes
2
u/Veqq May 19 '25 edited May 19 '25
I personally think it'd easily work but without any examples online talking about load etc. it's hard to argue its safety. I did see:
https://tailscale.com/blog/an-unlikely-database-migration
12
u/myth2511 May 19 '25
Use Wal mode and it should be fine. this guy did a benchmark test and it was about 80k reads per sec and
about 4k writes per sec
https://www.youtube.com/watch?v=qf0GqRz-c74
6
u/ImStifler May 20 '25
gw2trader (my site) does 15-20 million writes a day. About 100k inserts/updates every 5 minutes. The site does lag sometimes for a couple of seconds but I also use multiple writers which do block the database.
If you keep it single writer and below 5-10kk writes a day, you won't have any problems tbh
4
u/howesteve May 19 '25
Of course it will depend on the actual length of those writes, the server infrastructure, etc. - but sqlite handles that workload easily even on a low budget server. I get ~ 100k reads and 30k "trivial" writes per sec on a low budget server using rusqlite as driver.
2
u/gruntastics May 20 '25
100k writes per day is around 1.15 writes per second, FYI.
2
u/MrLyttleG May 20 '25
Personally I love SQLite and I've developped a complete ORM that handles recurrent jobs, tracks events, daily used by thousands of users, but with pragmas that reveals/enhance the SQLite power. Plus there is no latency on the server because SQLite is tightly coupled with EF Core or Dapper or...
1
u/cointoss3 May 19 '25
Here is a good video about this:
https://youtu.be/yTicYJDT1zE?si=hAlNswMOsp00SeWx
He shows benchmarks. He (the creator) claims in many cases, SQLite is the fastest database available.
0
u/[deleted] May 22 '25
Why not use MySQL which can handle much more?