You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pgml-cms/docs/benchmarks/million-requests-per-second.md
+3-13Lines changed: 3 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
#Million Requests per Second
2
2
3
-
4
-
5
3
The question "Does it Scale?" has become somewhat of a meme in software engineering. There is a good reason for it though, because most businesses plan for success. If your app, online store, or SaaS becomes popular, you want to be sure that the system powering it can serve all your new customers.
6
4
7
5
At PostgresML, we are very concerned with scale. Our engineering background took us through scaling PostgreSQL to 100 TB+, so we're certain that it scales, but could we scale machine learning alongside it?
@@ -12,18 +10,14 @@ If you missed our previous post and are wondering why someone would combine mach
12
10
13
11
##Architecture Overview
14
12
15
-
If you're familiar with how one runs PostgreSQL at scale, you can skip straight to the[results](broken-reference).
13
+
If you're familiar with how one runs PostgreSQL at scale, you can skip straight to the[results](broken-reference/).
16
14
17
15
Part of our thesis, and the reason why we chose Postgres as our host for machine learning, is that scaling machine learning inference is very similar to scaling read queries in a typical database cluster.
18
16
19
17
Inference speed varies based on the model complexity (e.g.`n_estimators` for XGBoost) and the size of the dataset (how many features the model uses), which is analogous to query complexity and table size in the database world and, as we'll demonstrate further on, scaling the latter is mostly a solved problem.
Copy file name to clipboardExpand all lines: pgml-cms/docs/benchmarks/mindsdb-vs-postgresml.md
+4-7Lines changed: 4 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -40,10 +40,9 @@ Another difference is that PostgresML also supports embedding models, and closel
40
40
41
41
The architectural implementations for these projects is significantly different. PostgresML takes a data centric approach with Postgres as the provider for both storage_and_ compute. To provide horizontal scalability for inference, the PostgresML team has also created[PgCat](https://github.com/postgresml/pgcat) to distribute workloads across many Postgres databases. On the other hand, MindsDB takes a service oriented approach that connects to various databases over the network.
@@ -56,8 +55,7 @@ The architectural implementations for these projects is significantly different.
56
55
| On Premise| ✅| ✅|
57
56
| Web UI| ✅| ✅|
58
57
59
-
\
60
-
58
+
\\
61
59
62
60
The difference in architecture leads to different tradeoffs and challenges. There are already hundreds of ways to get data into and out of a Postgres database, from just about every other service, language and platform that makes PostgresML highly compatible with other application workflows. On the other hand, the MindsDB Python service accepts connections from specifically supported clients like`psql` and provides a pseudo-SQL interface to the functionality. The service will parse incoming MindsDB commands that look similar to SQL (but are not), for tasks like configuring database connections, or doing actual machine learning. These commands typically have what looks like a sub-select, that will actually fetch data over the wire from configured databases for Machine Learning training and inference.
63
61
@@ -285,8 +283,7 @@ PostgresML is the clear winner in terms of performance. It seems to me that it c
There is a general trend, the larger and slower the model is, the more work is spent inside libtorch, the less the performance of the rest matters, but for interactive models and use cases there is a significant difference. We've tried to cover the most generous use case we could between these two. If we were to compare XGBoost or other classical algorithms, that can have sub millisecond prediction times in PostgresML, the 20ms Python service overhead of MindsDB just to parse the incoming query would be hundreds of times slower.