We use the PostgreSQL 12.7 database in Nakama to store the progress of the players. Once a second, the client sends the progress changes to the server via the RPC and the server immediately writes them to the database. Reading from the database happens very rarely, only when the player is authorized. So we noticed that one processor core for the database can only handle about 100-300 transactions per second. We tested it on both the Nakama cloud server and our test machine. This makes it completely impossible to keep tens of thousands of players online. I would like to understand if we have a mistake somewhere or are we doing something fundamentally wrong? How many transactions per second should 1 database core handle?
@l.skupkov None of this sounds unexpected to me. A database instance with just the single CPU core has to perform a lot of work in spinlocks which consume CPU.
In general how have you tested the performance on your set up? We’ve got customer game projects which handle 35,000 transactions per second on 8 core environments.