Browse Source

Cutelyst: Update to use the experimental thread balancer (#2667)

* Cutelyst: Update to use the experimental thread balancer

* cutelyst: Fix missing pkg-config

* cutelyst: update to beta
Daniel Nicoletti 8 years ago
parent
commit
25c5f149d1

+ 2 - 1
frameworks/C++/cutelyst/config.sh

@@ -14,6 +14,7 @@ echo UWSGI=${UWSGI}
 echo NGINX=${NGINX}
 echo QT_VERSION_MM=${QT_VERSION_MM}
 echo CUTELYST_EVENT_LOOP_EPOLL=${CUTELYST_EVENT_LOOP_EPOLL}
+echo BALANCER=${BALANCER}
 
 if [ "${DRIVER}" == "QMYSQL" ]; then
   fw_depends mysql
@@ -48,7 +49,7 @@ export LD_LIBRARY_PATH=/opt/qt${QT_VERSION_MM}/lib:${CROOT}/lib/x86_64-linux-gnu
 if [ -n "${UWSGI}" ]; then
   uwsgi --ini ${CROOT}/config.ini --plugin ${CROOT}/lib/uwsgi/plugins/cutelyst_plugin.so --cutelyst-app ${CROOT}/benchmarks/src/libcutelyst_benchmarks.so ${PROCESS_OR_THREAD} $MAX_THREADS &
 else
-  ${CROOT}/bin/cutelyst-wsgi --ini ${CROOT}/config.ini -a ${CROOT}/benchmarks/src/libcutelyst_benchmarks.so ${PROCESS_OR_THREAD} $MAX_THREADS --socket-timeout 0 &
+  ${CROOT}/bin/cutelyst-wsgi --ini ${CROOT}/config.ini -a ${CROOT}/benchmarks/src/libcutelyst_benchmarks.so ${PROCESS_OR_THREAD} $MAX_THREADS --socket-timeout 0 ${BALANCER} &
 fi
 
 # configure Nginx

+ 2 - 1
frameworks/C++/cutelyst/config/config.ini

@@ -1,5 +1,5 @@
 [uwsgi]
-master
+master = true
 ; Increase listen queue used for nginx connecting to uWSGI. This matches
 ; net.ipv4.tcp_max_syn_backlog and net.core.somaxconn.
 ; for performance
@@ -14,6 +14,7 @@ http-socket = :8080
 ;thunder-lock
 ; used by uwsgi_stop.ini
 pidfile = /tmp/uwsgi.pid
+cpu-affinity = 1
 
 [Cutelyst]
 Driver=

+ 2 - 1
frameworks/C++/cutelyst/config/config_socket.ini

@@ -1,5 +1,5 @@
 [uwsgi]
-master
+master = true
 ; Increase listen queue used for nginx connecting to uWSGI. This matches
 ; net.ipv4.tcp_max_syn_backlog and net.core.somaxconn.
 ; for performance
@@ -17,6 +17,7 @@ chmod-socket = 666
 ;thunder-lock
 ; used by uwsgi_stop.ini
 pidfile = /tmp/uwsgi.pid
+cpu-affinity = 1
 
 [Cutelyst]
 Driver=

+ 1 - 0
frameworks/C++/cutelyst/setup_thread.sh

@@ -4,5 +4,6 @@ DRIVER=
 UWSGI=
 NGINX=
 PROCESS_OR_THREAD=-t
+BALANCER=--experimental-thread-balancer
 
 source ${TROOT}/config.sh

+ 1 - 0
frameworks/C++/cutelyst/setup_thread_epoll.sh

@@ -4,6 +4,7 @@ DRIVER=
 UWSGI=
 NGINX=
 PROCESS_OR_THREAD=-t
+BALANCER=--experimental-thread-balancer
 export CUTELYST_EVENT_LOOP_EPOLL=1
 
 source ${TROOT}/config.sh

+ 1 - 0
frameworks/C++/cutelyst/setup_thread_my.sh

@@ -4,5 +4,6 @@ DRIVER=QMYSQL
 UWSGI=
 NGINX=
 PROCESS_OR_THREAD=-t
+BALANCER=--experimental-thread-balancer
 
 source ${TROOT}/config.sh

+ 1 - 0
frameworks/C++/cutelyst/setup_thread_my_epoll.sh

@@ -4,6 +4,7 @@ DRIVER=QMYSQL
 UWSGI=
 NGINX=
 PROCESS_OR_THREAD=-t
+BALANCER=--experimental-thread-balancer
 export CUTELYST_EVENT_LOOP_EPOLL=1
 
 source ${TROOT}/config.sh

+ 1 - 0
frameworks/C++/cutelyst/setup_thread_pg.sh

@@ -4,5 +4,6 @@ DRIVER=QPSQL
 UWSGI=
 NGINX=
 PROCESS_OR_THREAD=-t
+BALANCER=--experimental-thread-balancer
 
 source ${TROOT}/config.sh

+ 1 - 0
frameworks/C++/cutelyst/setup_thread_pg_epoll.sh

@@ -4,6 +4,7 @@ DRIVER=QPSQL
 UWSGI=
 NGINX=
 PROCESS_OR_THREAD=-t
+BALANCER=--experimental-thread-balancer
 export CUTELYST_EVENT_LOOP_EPOLL=1
 
 source ${TROOT}/config.sh

+ 1 - 1
toolset/setup/linux/frameworks/cutelyst.sh

@@ -2,7 +2,7 @@
 
 fw_installed cutelyst && return 0
 
-CUTELYST_VER=1.5.0
+CUTELYST_VER=1.6.0-beta4
 QT_VERSION_MM=56
 QT_VERSION_FULL=562-trusty
 CROOT=${IROOT}/cutelyst