SurrealDB Performance Benchmark #43
Replies: 16 comments 66 replies
-
Hi @theseusyang thanks for starting the discussion! We'll definitely be performing benchmarking for SurrealDB in due course. Currently, we are focussed on functionality and stability, and want to make the following changes for performance: #26, #24, and #22. Once those are implemented, performance should be far better than it is now! |
Beta Was this translation helpful? Give feedback.
-
I'd also be interested in seeing some benchmarks. Not a describe command, but for example a benchmark of the database loaded with data. Often times databases can start to lose performance with millions of records. |
Beta Was this translation helpful? Give feedback.
-
I'd also be interested in seeing some benchmarks. |
Beta Was this translation helpful? Give feedback.
-
The benchmarks are currently being worked on, we've used some initial results to improve performance and will release benchmarks publically once we have improved on a few more things. |
Beta Was this translation helpful? Give feedback.
-
I continue to be super interested in incorporating SurrealDB in some of my professional projects. However, I still interpret your answer to the Is SurrealDB ready for production use? FAQ basically as, "No, it's not." I'd be more that happy to be corrected, or simply learn about a more concrete timeline for significant performance improvements to land in a version (even if beta). Please keep up the great work. |
Beta Was this translation helpful? Give feedback.
-
Replying to this as it seems it has not been addressed in quite some time. It does not appear that benchmarks are currently publicly available, but some pre-made benchmarking tools are available here: https://github.com/surrealdb/surrealdb/tree/main/lib/benches |
Beta Was this translation helpful? Give feedback.
-
I have used SurrealDB in 2 applications recently. Honestly speaking I feel Postgres is outperforming Surreal. I am not so happy with Surreal. |
Beta Was this translation helpful? Give feedback.
-
Now SurrealDB 2.0 is out. is there any performance benchmark yet ? |
Beta Was this translation helpful? Give feedback.
-
I just did a relatively simple query on a single table with about 40,000 rows imported from Mysql, returning 1000 results. It took 280ms while it takes 7ms seconds in Mysql (with query cache turned off). That's almost 40x slower. However, if I use a record ID to select a specific record, it takes 0.15ms whereas mysql takes 3ms seconds to select a specific record. If I remove the indexes from the mysql table columns, it makes no difference for this query. If I add indexes to those columns in SurrealDB, it actually gets SLOWER - 400ms seconds for 1000 records, though it is the same 0.15ms for 1 record. Also, interestingly, I got similar numbers with both Memory and RocksDB storage. So, the bottleneck here seems to be SurrealDB itself. One factor could be that im using Surrealist over websockets whereas I use the mysql cli client. Perhaps network latency is a factor when transferring data. So, I have to conclude based off these crude tests that Surreal is extremely slow when doing large queries returning many records in a table. That's somewhat what I expected given how there's such an emphasis on having, linking and using specific record IDs. I think that probably means we should architect our applications in such a way that we have specific record IDs in hand when we run a query - and then do "joins" via embedded records or graph relations, rather than always starting from scratch with a big full table query. We may very well see better performance for complicated joins, graph traversals etc, as well as if we have sort of pregenerated "materialized views" I have to figure the team's delays in releasing benchmarks are because they've found similarly disappointing performance and are trying to improve things. HOWEVER, I have to assume that Surreal will keep getting faster as they keep working on it. Moreover, performance isn't necessarily the most important factor for a DB. Im using Surreal (or at least something other than the legacy Mysql) in order to implement a different application architecture which should improve my legacy application's performance and scalability by many orders of magnitude. Also, there's significant value in having full text and vector search, graph db, good tooling and syntax, live websocket queries, etc.. all in one package. So, I remain optimistic and eager for the future of SurrealDB! Still, I hope that benchmarks will come with native performance improvements as well as guidance on how to analyze and improve performance of our DBs |
Beta Was this translation helpful? Give feedback.
-
I just asked Tobie in his Discord AMA about benchmarks. He said that they have built out and are using their own custom benchmarking tool that allows you to test every aspect of Surrealdb, different types of queries etc... It also tests against various industry-standard DB benchmarks. They'll be releasing it all "in November", so hopefully sometime in the next month! Also, he separately mentioned that there's many enterprises already using Surreal in production with millions of users, queries etc... Given the basic performance observations that I and others have shared, perhaps they only use it in very particular (or perhaps background/async) ways. |
Beta Was this translation helpful? Give feedback.
-
Similar query in Postgres took only 1s. Hence Surreal is horribly slow. |
Beta Was this translation helpful? Give feedback.
-
@nickchomey I tested in my local machine (laptop i5, intel CPU 13th gen, 16gb ram, 512g SSD). |
Beta Was this translation helpful? Give feedback.
-
By the way.. I tried with 1 million records too which took about 50s in Surreal but about 7.5s in Postgres. Forgot to mention in my last message, I used SurrealKV. |
Beta Was this translation helpful? Give feedback.
-
@tobiemh I strongly suggest that you and your team prioritize addressing performance issues as your topmost priority. Without immediate attention, I fear this otherwise awesome product could face an unrecoverable and disastrous situation. While you’ve made great progress on features, it’s now crucial to shift focus to performance. Frankly speaking, I am very much skeptical now in using this db even though I still love it. But because of performance issue I am planning to switch back to Postgres. |
Beta Was this translation helpful? Give feedback.
-
@arriqaaq Assalamu alaikum, I am using SDB 2.1.2 on Windows 11. Machine conf: i5 13th Gen, 16g RAM, 512 g SSD. Please let me know yours. |
Beta Was this translation helpful? Give feedback.
-
@arriqaaq, Farhan bhai, Jazakallaah. I will test Sdb in my cloud m/c running Ubuntu in sha Allaah. As you say I think Sdb is not fully optimized for Windows OS. I have already started another LMS project using Sdb latest edition, Alhamdulillaah. |
Beta Was this translation helpful? Give feedback.
-
Anybody can show a surrealdb's benchmark, to describe the performance?
Beta Was this translation helpful? Give feedback.
All reactions