Просмотр исходного кода

Lithium update. (#5418)

* Lithium update.

* Lithium: lower the number of sql connections.
Matthieu Garrigues 5 лет назад
Родитель
Сommit
27dd22cd51

+ 1 - 1
frameworks/C++/lithium/lithium-mysql.dockerfile

@@ -5,7 +5,7 @@ RUN apt install -yqq libboost-dev libmariadb-dev wget  libboost-context-dev g++-
 
 COPY ./ ./
 
-ENV COMMIT=8594076a151ddaca03f8ce60189f97ecd69e1b88
+ENV COMMIT=db7562dd6a58a66b895c4fca53d10bf4b7463536
 
 RUN wget https://raw.githubusercontent.com/matt-42/lithium/$COMMIT/single_headers/lithium_mysql.hh
 RUN wget https://raw.githubusercontent.com/matt-42/lithium/$COMMIT/single_headers/lithium_http_backend.hh

+ 1 - 1
frameworks/C++/lithium/lithium-postgres.dockerfile

@@ -5,7 +5,7 @@ RUN apt install -yqq g++-9 libboost-dev postgresql-server-dev-all libpq-dev wget
 
 COPY ./ ./
 
-ENV COMMIT=8594076a151ddaca03f8ce60189f97ecd69e1b88
+ENV COMMIT=db7562dd6a58a66b895c4fca53d10bf4b7463536
 
 RUN wget https://raw.githubusercontent.com/matt-42/lithium/$COMMIT/single_headers/lithium_pgsql.hh
 RUN wget https://raw.githubusercontent.com/matt-42/lithium/$COMMIT/single_headers/lithium_http_backend.hh

+ 2 - 2
frameworks/C++/lithium/lithium.cc

@@ -39,7 +39,7 @@ int main(int argc, char* argv[]) {
   auto sql_db =
     mysql_database(s::host = argv[1], s::database = "hello_world", s::user = "benchmarkdbuser",
                    s::password = "benchmarkdbpass", s::port = 3306, s::charset = "utf8");
-  int mysql_max_connection = 512;
+  int mysql_max_connection = 256;
   li::max_mysql_connections_per_thread = (mysql_max_connection / nprocs);
   std::cout << "Using " << li::max_mysql_connections_per_thread << " connections per thread. " << nprocs << " threads." << std::endl; 
 
@@ -47,7 +47,7 @@ int main(int argc, char* argv[]) {
   auto sql_db =
     pgsql_database(s::host = argv[1], s::database = "hello_world", s::user = "benchmarkdbuser",
                    s::password = "benchmarkdbpass", s::port = 5432, s::charset = "utf8");
-  int pgsql_max_connection = 512;
+  int pgsql_max_connection = 256;
   li::max_pgsql_connections_per_thread = (pgsql_max_connection / nprocs);
   std::cout << "Using " << li::max_pgsql_connections_per_thread << " connections per thread. " << nprocs << " threads." << std::endl; 
 #endif