From 249a5bc850ac561f41c52937d4336224fdd8ec66 Mon Sep 17 00:00:00 2001 From: Sumeet Chhetri Date: Sun, 14 Jul 2024 19:52:45 +0530 Subject: [PATCH] Cleanup unrequired files [docker_verify][skip_build] --- docker/build-te-images.sh | 10 +- .../te/tekp/ffead-cpp-base-debug.dockerfile | 31 -- docker/te/tekp/ffead-cpp-base.dockerfile | 29 -- .../ffead-cpp-postgresql-async.dockerfile | 7 - ...-cpp-postgresql-pipelined-async.dockerfile | 7 - ...ffead-cpp-postgresql-wire-async.dockerfile | 7 - .../tekp/ffead-cpp-postgresql-wire.dockerfile | 7 - .../te/tekp/ffead-cpp-postgresql.dockerfile | 7 - .../te/tekp/ffead-cpp-v-base-debug.dockerfile | 29 -- docker/te/tekp/ffead-cpp-v-base.dockerfile | 29 -- ...ad-cpp-v-picov-postgresql-async.dockerfile | 7 - ...icov-postgresql-pipelined-async.dockerfile | 7 - ...p-v-picov-postgresql-wire-async.dockerfile | 7 - ...ead-cpp-v-picov-postgresql-wire.dockerfile | 7 - .../ffead-cpp-v-picov-postgresql.dockerfile | 7 - .../te/tekp/install_ffead-cpp-dependencies.sh | 103 ------ docker/te/tekp/install_ffead-cpp-framework.sh | 109 ------ .../install_ffead-cpp-sql-raw-profiled.sh | 112 ------ ...tall_ffead-cpp-sql-raw-v-picov-profiled.sh | 86 ----- docker/te/tekp/install_post_process.sh | 50 --- docker/te/tekp/run_ffead.sh | 332 ------------------ docker/te/tekp/server.sh | 39 -- docker/te/tekp/sql-async-profiled-install.sh | 36 -- docker/te/tekp/sql-profiled-install.sh | 36 -- docker/te/tekp/sql-profiled-util.sh | 112 ------ .../te/tekp/sql-v-picov-profiled-install.sh | 63 ---- 26 files changed, 5 insertions(+), 1271 deletions(-) delete mode 100644 docker/te/tekp/ffead-cpp-base-debug.dockerfile delete mode 100644 docker/te/tekp/ffead-cpp-base.dockerfile delete mode 100644 docker/te/tekp/ffead-cpp-postgresql-async.dockerfile delete mode 100644 docker/te/tekp/ffead-cpp-postgresql-pipelined-async.dockerfile delete mode 100644 docker/te/tekp/ffead-cpp-postgresql-wire-async.dockerfile delete mode 100644 docker/te/tekp/ffead-cpp-postgresql-wire.dockerfile delete mode 100644 docker/te/tekp/ffead-cpp-postgresql.dockerfile delete mode 100644 docker/te/tekp/ffead-cpp-v-base-debug.dockerfile delete mode 100644 docker/te/tekp/ffead-cpp-v-base.dockerfile delete mode 100644 docker/te/tekp/ffead-cpp-v-picov-postgresql-async.dockerfile delete mode 100644 docker/te/tekp/ffead-cpp-v-picov-postgresql-pipelined-async.dockerfile delete mode 100644 docker/te/tekp/ffead-cpp-v-picov-postgresql-wire-async.dockerfile delete mode 100644 docker/te/tekp/ffead-cpp-v-picov-postgresql-wire.dockerfile delete mode 100644 docker/te/tekp/ffead-cpp-v-picov-postgresql.dockerfile delete mode 100644 docker/te/tekp/install_ffead-cpp-dependencies.sh delete mode 100644 docker/te/tekp/install_ffead-cpp-framework.sh delete mode 100644 docker/te/tekp/install_ffead-cpp-sql-raw-profiled.sh delete mode 100644 docker/te/tekp/install_ffead-cpp-sql-raw-v-picov-profiled.sh delete mode 100644 docker/te/tekp/install_post_process.sh delete mode 100644 docker/te/tekp/run_ffead.sh delete mode 100644 docker/te/tekp/server.sh delete mode 100644 docker/te/tekp/sql-async-profiled-install.sh delete mode 100644 docker/te/tekp/sql-profiled-install.sh delete mode 100644 docker/te/tekp/sql-profiled-util.sh delete mode 100644 docker/te/tekp/sql-v-picov-profiled-install.sh diff --git a/docker/build-te-images.sh b/docker/build-te-images.sh index 20eea637..51af231d 100644 --- a/docker/build-te-images.sh +++ b/docker/build-te-images.sh @@ -15,11 +15,11 @@ then fi cd te -rm -rf tekp -mkdir tekp -cp base/*.dockerfile scripts/*.sh *.sh *.dockerfile tekp/ -#cp -rf postgresql tekp/ -cd tekp +rm -rf temp +mkdir temp +cp base/*.dockerfile scripts/*.sh *.sh *.dockerfile temp/ +#cp -rf postgresql temp/ +cd temp VERSION="${VERSION}-te" diff --git a/docker/te/tekp/ffead-cpp-base-debug.dockerfile b/docker/te/tekp/ffead-cpp-base-debug.dockerfile deleted file mode 100644 index 3e574629..00000000 --- a/docker/te/tekp/ffead-cpp-base-debug.dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -FROM ubuntu:latest -LABEL maintainer="Sumeet Chhetri" -LABEL version="7.0-debug" -LABEL description="Base ffead-cpp docker image with commit id - master" - -ENV IROOT=/installs -ENV DEBUG=on - -ENV DEBIAN_FRONTEND noninteractive -RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections - -#COPY t1/ /installs/t1/ -#COPY t2/ /installs/t2/ -#COPY t3/ /installs/t3/ -#COPY t4/ /installs/t4/ -#COPY t5/ /installs/t5/ -#COPY t6/ /installs/t6/ -#COPY t7/ /installs/t7/ - -WORKDIR ${IROOT} - -COPY install_ffead-cpp-dependencies.sh install_ffead-cpp-framework.sh install_post_process.sh server.sh ${IROOT}/ -RUN chmod 755 ${IROOT}/*.sh -RUN ./install_ffead-cpp-dependencies.sh -RUN ./install_ffead-cpp-framework.sh -RUN ./install_post_process.sh && cd ${IROOT}/ffead-cpp-src && ninja clean && rm -rf CMakeFiles CMakeCache.txt - -COPY run_ffead.sh / -RUN chmod 755 /run_ffead.sh - -RUN apt update -yqq && apt --fix-broken -yqq install && apt install -yqq gdb net-tools vim diff --git a/docker/te/tekp/ffead-cpp-base.dockerfile b/docker/te/tekp/ffead-cpp-base.dockerfile deleted file mode 100644 index db7e4a60..00000000 --- a/docker/te/tekp/ffead-cpp-base.dockerfile +++ /dev/null @@ -1,29 +0,0 @@ -FROM ubuntu:latest -LABEL maintainer="Sumeet Chhetri" -LABEL version="7.0" -LABEL description="Base ffead-cpp docker image with commit id - master" - -ENV IROOT=/installs -ENV DEBUG=off - -ENV DEBIAN_FRONTEND noninteractive -RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections - -#COPY t1/ /installs/t1/ -#COPY t2/ /installs/t2/ -#COPY t3/ /installs/t3/ -#COPY t4/ /installs/t4/ -#COPY t5/ /installs/t5/ -#COPY t6/ /installs/t6/ -#COPY t7/ /installs/t7/ - -WORKDIR ${IROOT} - -COPY install_ffead-cpp-dependencies.sh install_ffead-cpp-framework.sh install_post_process.sh server.sh ${IROOT}/ -RUN chmod 755 ${IROOT}/*.sh -RUN ./install_ffead-cpp-dependencies.sh -RUN ./install_ffead-cpp-framework.sh -RUN ./install_post_process.sh && cd ${IROOT}/ffead-cpp-src && ninja clean && rm -rf CMakeFiles CMakeCache.txt - -COPY run_ffead.sh / -RUN chmod 755 /run_ffead.sh diff --git a/docker/te/tekp/ffead-cpp-postgresql-async.dockerfile b/docker/te/tekp/ffead-cpp-postgresql-async.dockerfile deleted file mode 100644 index cf1a3f7d..00000000 --- a/docker/te/tekp/ffead-cpp-postgresql-async.dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM sumeetchhetri/ffead-cpp-base:7.0 - -ENV IROOT=/installs - -WORKDIR / - -CMD ./run_ffead.sh ffead-cpp-7.0-sql emb postgresql-raw-async memory diff --git a/docker/te/tekp/ffead-cpp-postgresql-pipelined-async.dockerfile b/docker/te/tekp/ffead-cpp-postgresql-pipelined-async.dockerfile deleted file mode 100644 index acc6b4b4..00000000 --- a/docker/te/tekp/ffead-cpp-postgresql-pipelined-async.dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM sumeetchhetri/ffead-cpp-base:7.0 - -ENV IROOT=/installs - -WORKDIR / - -CMD ./run_ffead.sh ffead-cpp-7.0-sql emb postgresql-raw-async memory batch diff --git a/docker/te/tekp/ffead-cpp-postgresql-wire-async.dockerfile b/docker/te/tekp/ffead-cpp-postgresql-wire-async.dockerfile deleted file mode 100644 index 1039c22d..00000000 --- a/docker/te/tekp/ffead-cpp-postgresql-wire-async.dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM sumeetchhetri/ffead-cpp-base:7.0 - -ENV IROOT=/installs - -WORKDIR / - -CMD ./run_ffead.sh ffead-cpp-7.0-sql emb postgresql-wire-async memory diff --git a/docker/te/tekp/ffead-cpp-postgresql-wire.dockerfile b/docker/te/tekp/ffead-cpp-postgresql-wire.dockerfile deleted file mode 100644 index 19c0959c..00000000 --- a/docker/te/tekp/ffead-cpp-postgresql-wire.dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM sumeetchhetri/ffead-cpp-base:7.0 - -ENV IROOT=/installs - -WORKDIR / - -CMD ./run_ffead.sh ffead-cpp-7.0-sql emb postgresql-wire memory diff --git a/docker/te/tekp/ffead-cpp-postgresql.dockerfile b/docker/te/tekp/ffead-cpp-postgresql.dockerfile deleted file mode 100644 index c2ba5788..00000000 --- a/docker/te/tekp/ffead-cpp-postgresql.dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM sumeetchhetri/ffead-cpp-base:7.0 - -ENV IROOT=/installs - -WORKDIR / - -CMD ./run_ffead.sh ffead-cpp-7.0-sql emb postgresql-raw memory diff --git a/docker/te/tekp/ffead-cpp-v-base-debug.dockerfile b/docker/te/tekp/ffead-cpp-v-base-debug.dockerfile deleted file mode 100644 index e7a43329..00000000 --- a/docker/te/tekp/ffead-cpp-v-base-debug.dockerfile +++ /dev/null @@ -1,29 +0,0 @@ -FROM sumeetchhetri/ffead-cpp-base:7.0-debug -LABEL maintainer="Sumeet Chhetri" -LABEL version="7.0-debug" -LABEL description="Base v docker image with ffead-cpp v7.0 commit id - master" - -ENV IROOT=/installs - -RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libt3* /usr/local/lib/libt4* /usr/local/lib/libt6* /usr/local/lib/libt7* \ - /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \ - ln -s ${IROOT}/ffead-cpp-7.0-sql/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \ - ln -s ${IROOT}/ffead-cpp-7.0-sql/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \ - ln -s ${IROOT}/ffead-cpp-7.0-sql/lib/libinter.so /usr/local/lib/libinter.so && \ - ln -s ${IROOT}/ffead-cpp-7.0-sql/lib/libdinter.so /usr/local/lib/libdinter.so && \ - ldconfig - -RUN apt update -yqq && apt -yqq --fix-broken install && apt install -y git make && rm -rf /var/lib/apt/lists/* -#For Latest vlang, uncomment the below mentioned line, due to lot of new enhancements and unsafe block handling, vlang has slowed down tremendously -#RUN git clone https://github.com/vlang/v && cd v && make && ./v symlink - -#For the fastest vlang performance, use 0.1.29, where the unsafe changes were only restricted to pointer arithmetic -RUN wget -q https://github.com/vlang/v/releases/download/0.1.29/v_linux.zip && unzip -q v_linux.zip && cp ${IROOT}/lang-server-backends/v/pico.v/picoev.v v/vlib/picoev/picoev.v && cd v && chmod +x v && ./v symlink && cd .. && rm -f v_linux.zip - -WORKDIR ${IROOT}/lang-server-backends/v/vweb -#COPY vweb.v ${IROOT}/lang-server-backends/v/vweb/ -#RUN chmod +x *.sh && ./build.sh && cp vweb $IROOT/ - -WORKDIR ${IROOT}/lang-server-backends/v/pico.v -#COPY main.v ${IROOT}/lang-server-backends/v/pico.v/ -RUN chmod +x *.sh && ./build-debug.sh && cp main $IROOT/main && cp main $IROOT/main_async diff --git a/docker/te/tekp/ffead-cpp-v-base.dockerfile b/docker/te/tekp/ffead-cpp-v-base.dockerfile deleted file mode 100644 index 6bb80032..00000000 --- a/docker/te/tekp/ffead-cpp-v-base.dockerfile +++ /dev/null @@ -1,29 +0,0 @@ -FROM sumeetchhetri/ffead-cpp-base:7.0 -LABEL maintainer="Sumeet Chhetri" -LABEL version="7.0" -LABEL description="Base v docker image with ffead-cpp v7.0 commit id - master" - -ENV IROOT=/installs - -RUN rm -f /usr/local/lib/libffead-* /usr/local/lib/libt3* /usr/local/lib/libt4* /usr/local/lib/libt6* /usr/local/lib/libt7* \ - /usr/local/lib/libinter.so /usr/local/lib/libdinter.so && \ - ln -s ${IROOT}/ffead-cpp-7.0-sql/lib/libffead-modules.so /usr/local/lib/libffead-modules.so && \ - ln -s ${IROOT}/ffead-cpp-7.0-sql/lib/libffead-framework.so /usr/local/lib/libffead-framework.so && \ - ln -s ${IROOT}/ffead-cpp-7.0-sql/lib/libinter.so /usr/local/lib/libinter.so && \ - ln -s ${IROOT}/ffead-cpp-7.0-sql/lib/libdinter.so /usr/local/lib/libdinter.so && \ - ldconfig - -RUN apt update -yqq && apt -yqq --fix-broken install && apt install -y git make && rm -rf /var/lib/apt/lists/* -#For Latest vlang, uncomment the below mentioned line, due to lot of new enhancements and unsafe block handling, vlang has slowed down tremendously -#RUN git clone https://github.com/vlang/v && cd v && make && ./v symlink - -#For the fastest vlang performance, use 0.1.29, where the unsafe changes were only restricted to pointer arithmetic -RUN wget -q https://github.com/vlang/v/releases/download/0.1.29/v_linux.zip && unzip -q v_linux.zip && cp ${IROOT}/lang-server-backends/v/pico.v/picoev.v v/vlib/picoev/picoev.v && cd v && chmod +x v && ./v symlink && cd .. && rm -f v_linux.zip - -WORKDIR ${IROOT}/lang-server-backends/v/vweb -#COPY vweb.v ${IROOT}/lang-server-backends/v/vweb/ -#RUN chmod +x *.sh && ./build.sh && cp vweb $IROOT/ - -WORKDIR ${IROOT}/lang-server-backends/v/pico.v -#COPY main.v ${IROOT}/lang-server-backends/v/pico.v/ -RUN chmod +x *.sh && ./build.sh && cp main $IROOT/main && cp main $IROOT/main_async diff --git a/docker/te/tekp/ffead-cpp-v-picov-postgresql-async.dockerfile b/docker/te/tekp/ffead-cpp-v-picov-postgresql-async.dockerfile deleted file mode 100644 index 7d3159f9..00000000 --- a/docker/te/tekp/ffead-cpp-v-picov-postgresql-async.dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM sumeetchhetri/ffead-cpp-v-base:7.0 - -ENV IROOT=/installs - -WORKDIR / - -CMD ./run_ffead.sh ffead-cpp-7.0-sql v-picov postgresql-raw-async memory diff --git a/docker/te/tekp/ffead-cpp-v-picov-postgresql-pipelined-async.dockerfile b/docker/te/tekp/ffead-cpp-v-picov-postgresql-pipelined-async.dockerfile deleted file mode 100644 index 1c5e3f2e..00000000 --- a/docker/te/tekp/ffead-cpp-v-picov-postgresql-pipelined-async.dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM sumeetchhetri/ffead-cpp-v-base:7.0 - -ENV IROOT=/installs - -WORKDIR / - -CMD ./run_ffead.sh ffead-cpp-7.0-sql v-picov postgresql-raw-async memory batch diff --git a/docker/te/tekp/ffead-cpp-v-picov-postgresql-wire-async.dockerfile b/docker/te/tekp/ffead-cpp-v-picov-postgresql-wire-async.dockerfile deleted file mode 100644 index 28d47ac1..00000000 --- a/docker/te/tekp/ffead-cpp-v-picov-postgresql-wire-async.dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM sumeetchhetri/ffead-cpp-v-base:7.0 - -ENV IROOT=/installs - -WORKDIR / - -CMD ./run_ffead.sh ffead-cpp-7.0-sql v-picov postgresql-wire-async memory diff --git a/docker/te/tekp/ffead-cpp-v-picov-postgresql-wire.dockerfile b/docker/te/tekp/ffead-cpp-v-picov-postgresql-wire.dockerfile deleted file mode 100644 index 7f3b692f..00000000 --- a/docker/te/tekp/ffead-cpp-v-picov-postgresql-wire.dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM sumeetchhetri/ffead-cpp-v-base:7.0 - -ENV IROOT=/installs - -WORKDIR / - -CMD ./run_ffead.sh ffead-cpp-7.0-sql v-picov postgresql-wire memory diff --git a/docker/te/tekp/ffead-cpp-v-picov-postgresql.dockerfile b/docker/te/tekp/ffead-cpp-v-picov-postgresql.dockerfile deleted file mode 100644 index 713a1946..00000000 --- a/docker/te/tekp/ffead-cpp-v-picov-postgresql.dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM sumeetchhetri/ffead-cpp-v-base:7.0 - -ENV IROOT=/installs - -WORKDIR / - -CMD ./run_ffead.sh ffead-cpp-7.0-sql v-picov postgresql-raw memory diff --git a/docker/te/tekp/install_ffead-cpp-dependencies.sh b/docker/te/tekp/install_ffead-cpp-dependencies.sh deleted file mode 100644 index a63c515c..00000000 --- a/docker/te/tekp/install_ffead-cpp-dependencies.sh +++ /dev/null @@ -1,103 +0,0 @@ -#!/bin/bash - -apt update -yqq && apt install --no-install-recommends -yqq autoconf-archive unzip uuid-dev odbc-postgresql unixodbc unixodbc-dev \ - apache2 apache2-dev libapr1-dev libaprutil1-dev memcached libmemcached-dev redis-server libssl-dev \ - zlib1g-dev cmake make clang-format ninja-build libcurl4-openssl-dev git libpq-dev libpugixml-dev\ - wget build-essential pkg-config libpcre3-dev curl libgtk2.0-dev libgdk-pixbuf2.0-dev bison flex libreadline-dev -apt-get install --reinstall ca-certificates - -cd $IROOT - -mkdir /usr/local/share/ca-certificates/cacert.org -wget -P /usr/local/share/ca-certificates/cacert.org http://www.cacert.org/certs/root.crt http://www.cacert.org/certs/class3.crt -update-ca-certificates -git config --global http.sslCAinfo /etc/ssl/certs/ca-certificates.crt - -#redis will not start correctly on bionic with this config -sed -i "s/bind .*/bind 127.0.0.1/g" /etc/redis/redis.conf - -echo never > /sys/kernel/mm/transparent_hugepage/enabled -echo 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' >> /etc/rc.local -sysctl vm.overcommit_memory=1 - -service apache2 stop -service memcached stop -service redis-server stop - -cd $IROOT -git clone https://github.com/efficient/libcuckoo.git -cd libcuckoo -git checkout ea8c36c65bf9cf83aaf6b0db971248c6ae3686cf -b works -cmake -DCMAKE_INSTALL_PREFIX=/usr . -make install -cd $IROOT -rm -rf libcuckoo - -wget -q https://mirror.csclub.uwaterloo.ca/mysql/Downloads/Connector-ODBC/8.0/mysql-connector-odbc_8.0.29-1ubuntu21.10_amd64.deb -dpkg -i mysql-connector-odbc_8.0.29-1ubuntu21.10_amd64.deb -wget -q https://mirror.csclub.uwaterloo.ca/mysql/Downloads/Connector-ODBC/8.0/mysql-connector-odbc-setup_8.0.29-1ubuntu21.10_amd64.deb -dpkg -i mysql-connector-odbc-setup_8.0.29-1ubuntu21.10_amd64.deb -rm -f *.deb - -#wget -q https://github.com/mongodb/mongo-c-driver/releases/download/1.4.2/mongo-c-driver-1.4.2.tar.gz -#tar xf mongo-c-driver-1.4.2.tar.gz -#rm -f mongo-c-driver-1.4.2.tar.gz -#cd mongo-c-driver-1.4.2/ && \ -# ./configure --disable-automatic-init-and-cleanup && \ -# make && make install -#cd $IROOT -#rm -rf mongo-c-driver-1.4.2 -ENV VERSION=1.26.2 -RUN wget "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/$VERSION.tar.gz" --output-document="mongo-c-driver-$VERSION.tar.gz" -RUN tar xf "mongo-c-driver-$VERSION.tar.gz" -RUN rm -f "mongo-c-driver-$VERSION.tar.gz" -RUN cd mongo-c-driver-$VERSION/ && mkdir _build && cmake -S . -B _build \ --D ENABLE_EXTRA_ALIGNMENT=OFF \ --D ENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF -D ENABLE_TESTS=OFF -D ENABLE_EXAMPLES=OFF \ --D CMAKE_BUILD_TYPE=RelWithDebInfo \ --D BUILD_VERSION="$VERSION" \ --D ENABLE_SSL=OFF \ --D ENABLE_SASL=OFF \ --D ENABLE_MONGOC=ON && cmake --build _build --config RelWithDebInfo --parallel && cmake --install _build -RUN rm -rf "mongo-c-driver-$VERSION" - -wget -q https://github.com/redis/hiredis/archive/v1.0.2.tar.gz -tar xf v1.0.2.tar.gz -rm -f v1.0.2.tar.gz -cd hiredis-1.0.2/ -cmake . && make install -cd $IROOT -rm -rf hiredis-1.0.2 - -wget -q https://github.com/sewenew/redis-plus-plus/archive/refs/tags/1.3.10.tar.gz -tar xf 1.3.10.tar.gz -rm -f 1.3.10.tar.gz -cd redis-plus-plus-1.3.10/ -mkdir build -cd build -cmake -DREDIS_PLUS_PLUS_CXX_STANDARD=17 .. && make && make install -cd $IROOT -rm -rf redis-plus-plus-1.3.10 - -cd $IROOT -wget -q https://github.com/microsoft/mimalloc/archive/v2.1.2.tar.gz -tar xf v2.1.2.tar.gz -rm -f v2.1.2.tar.gz -cd mimalloc-2.1.2 -mkdir -p out/release -cd out/release -cmake ../.. -DCMAKE_BUILD_TYPE=Release -make && make install -cd $IROOT -rm -rf mimalloc-2.1.2 - -wget -q https://github.com/microsoft/snmalloc/archive/0.6.2.tar.gz -tar xf 0.6.2.tar.gz -rm -f 0.6.2.tar.gz -cd snmalloc-0.6.2 -mkdir build -cd build -cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Release -ninja -cd $IROOT -rm -rf snmalloc-0.6.2 diff --git a/docker/te/tekp/install_ffead-cpp-framework.sh b/docker/te/tekp/install_ffead-cpp-framework.sh deleted file mode 100644 index ef2a6884..00000000 --- a/docker/te/tekp/install_ffead-cpp-framework.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/bash - -#Set the number of threads -------- -MAX_THREADS=$(( 3 * `nproc` / 2 )) - -WRIT_THREADS=$(( $MAX_THREADS / 3 )) -SERV_THREADS=$(( $MAX_THREADS - $WRIT_THREADS )) - -git clone https://github.com/sumeetchhetri/ffead-cpp -#git checkout 92c3a9e3d5ec1de4a909fe688d649d7f31e050c0 -b 6.0 -cd ffead-cpp -rm -rf .git -cd .. -mv ffead-cpp ffead-cpp-src -mv ffead-cpp-src/lang-server-backends ${IROOT}/ - -cd /tmp -git clone https://github.com/Tencent/rapidjson -cp -rf rapidjson/include/rapidjson /usr/include/ -rm -rf rapidjson - -cd $IROOT/ffead-cpp-src/ - -chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh -#rm -rf web/t1 -#rm -rf web/t2 -#rm -rf web/t3 -#rm -rf web/t4 -#rm -rf web/t5 -#rm -rf web/t6 -#rm -rf web/t7 -mv ${IROOT}/server.sh script/ -#mv ${IROOT}/t1 web/ -#mv ${IROOT}/t2 web/ -#mv ${IROOT}/t3 web/ -#mv ${IROOT}/t4 web/ -#mv ${IROOT}/t5 web/ -#mv ${IROOT}/t6 web/ -#mv ${IROOT}/t7 web/ -sed -i 's|THRD_PSIZ=6|THRD_PSIZ='${SERV_THREADS}'|g' resources/server.prop -sed -i 's|W_THRD_PSIZ=2|W_THRD_PSIZ='${WRIT_THREADS}'|g' resources/server.prop -sed -i 's|ENABLE_CRS=true|ENABLE_CRS=false|g' resources/server.prop -sed -i 's|ENABLE_SEC=true|ENABLE_SEC=false|g' resources/server.prop -sed -i 's|ENABLE_FLT=true|ENABLE_FLT=false|g' resources/server.prop -sed -i 's|ENABLE_CNT=true|ENABLE_CNT=true|g' resources/server.prop -sed -i 's|ENABLE_EXT_CNT=true|ENABLE_EXT_CNT=false|g' resources/server.prop -sed -i 's|ENABLE_CNT_MPG=true|ENABLE_CNT_MPG=false|g' resources/server.prop -sed -i 's|ENABLE_CNT_PTH=true|ENABLE_CNT_PTH=false|g' resources/server.prop -sed -i 's|ENABLE_CNT_EXT=true|ENABLE_CNT_EXT=false|g' resources/server.prop -sed -i 's|ENABLE_CNT_RST=true|ENABLE_CNT_RST=true|g' resources/server.prop -sed -i 's|ENABLE_EXT=true|ENABLE_EXT=true|g' resources/server.prop -sed -i 's|ENABLE_SCR=true|ENABLE_SCR=false|g' resources/server.prop -sed -i 's|ENABLE_SWS=true|ENABLE_SWS=false|g' resources/server.prop -sed -i 's|ENABLE_JOBS=true|ENABLE_JOBS=false|g' resources/server.prop -sed -i 's|LOGGING_ENABLED=true|LOGGING_ENABLED=false|g' resources/server.prop -sed -i 's|EVH_SINGLE=true|EVH_SINGLE=false|g' resources/server.prop - -rm -rf web/default web/oauthApp web/flexApp web/markers web/te-benchmark web/peer-server web/t1 web/t2 - -sed -i 's|localhost|tfb-database|g' web/t3/config/sdorm.xml -sed -i 's|localhost|tfb-database|g' web/t4/config/sdorm.xml -sed -i 's|localhost|tfb-database|g' web/t5/config/sdorm.xml -sed -i 's|localhost|tfb-database|g' web/t6/config/sdorm.xml -sed -i 's|localhost|tfb-database|g' web/t7/config/sdorm.xml -sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/default)||g' CMakeLists.txt -sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/flexApp)||g' CMakeLists.txt -sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/oauthApp)||g' CMakeLists.txt -sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/markers)||g' CMakeLists.txt -sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/te-benchmark)||g' CMakeLists.txt -sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/peer-server)||g' CMakeLists.txt -sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t1)||g' CMakeLists.txt -sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t2)||g' CMakeLists.txt -sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/default/libdefault${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt -sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/flexApp/libflexApp${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt -sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/oauthApp/liboauthApp${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt -sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/markers/libmarkers${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt -sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/te-benchmark/libte-benchmark${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt -sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/peer-server/libpeer-server${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt -sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t1/libt1${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt -sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t2/libt2{LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt -sed -i 's|install(DIRECTORY DESTINATION "${PROJECT_NAME}-bin/web/default")||g' CMakeLists.txt -sed -i 's|install(DIRECTORY DESTINATION "${PROJECT_NAME}-bin/web/flexApp")||g' CMakeLists.txt -sed -i 's|install(DIRECTORY DESTINATION "${PROJECT_NAME}-bin/web/oauthApp")||g' CMakeLists.txt -sed -i 's|install(DIRECTORY DESTINATION "${PROJECT_NAME}-bin/web/markers")||g' CMakeLists.txt -sed -i 's|install(DIRECTORY DESTINATION "${PROJECT_NAME}-bin/web/peer-server")||g' CMakeLists.txt -sed -i 's|install(DIRECTORY DESTINATION "${PROJECT_NAME}-bin/web/te-benchmark")||g' CMakeLists.txt -sed -i 's|install(DIRECTORY DESTINATION "${PROJECT_NAME}-bin/web/t1")||g' CMakeLists.txt -sed -i 's|install(DIRECTORY ${PROJECT_SOURCE_DIR}/web/default/ DESTINATION ${PROJECT_NAME}-bin/web/default)||g' CMakeLists.txt -sed -i 's|install(DIRECTORY ${PROJECT_SOURCE_DIR}/web/flexApp/ DESTINATION ${PROJECT_NAME}-bin/web/flexApp)||g' CMakeLists.txt -sed -i 's|install(DIRECTORY ${PROJECT_SOURCE_DIR}/web/oauthApp/ DESTINATION ${PROJECT_NAME}-bin/web/oauthApp)||g' CMakeLists.txt -sed -i 's|install(DIRECTORY ${PROJECT_SOURCE_DIR}/web/markers/ DESTINATION ${PROJECT_NAME}-bin/web/markers)||g' CMakeLists.txt -sed -i 's|install(DIRECTORY ${PROJECT_SOURCE_DIR}/web/peer-server/ DESTINATION ${PROJECT_NAME}-bin/web/peer-server)||g' CMakeLists.txt -sed -i 's|install(DIRECTORY ${PROJECT_SOURCE_DIR}/web/te-benchmark/ DESTINATION ${PROJECT_NAME}-bin/web/te-benchmark)||g' CMakeLists.txt -sed -i 's|install(DIRECTORY ${PROJECT_SOURCE_DIR}/web/t1/ DESTINATION ${PROJECT_NAME}-bin/web/t1)||g' CMakeLists.txt -sed -i 's|web/default/src/autotools/Makefile||g' configure.ac -sed -i 's|web/flexApp/src/autotools/Makefile||g' configure.ac -sed -i 's|web/oauthApp/src/autotools/Makefile||g' configure.ac -sed -i 's|web/markers/src/autotools/Makefile||g' configure.ac -sed -i 's|web/te-benchmark/src/autotools/Makefile||g' configure.ac -sed -i 's|web/peer-server/src/autotools/Makefile||g' configure.ac -sed -i 's|web/t1/src/autotools/Makefile||g' configure.ac -sed -i 's|web/t2/src/autotools/Makefile||g' configure.ac - -#./autogen.sh -#./configure --enable-debug=no --enable-apachemod=yes --enable-nginxmod=yes --enable-mod_sdormmongo=yes --enable-mod_sdormsql=yes --enable-mod_rediscache=yes --enable-mod_memcached=yes CPPFLAGS="$CPPFLAGS -I${IROOT}/include/libmongoc-1.0 -I${IROOT}/include/libbson-1.0 -I${IROOT}/include/" LDFLAGS="$LDFLAGS -L${IROOT} -L${IROOT}/lib" -cmake -DSRV_EMB=on -DMOD_APACHE=off -DMOD_NGINX=off -DMOD_MEMCACHED=on -DMOD_REDIS=on -DMOD_SDORM_MONGO=off -DDEBUG=${DEBUG} -DWITH_RAPIDJSON=on -DWITH_PUGIXML=on -GNinja . - -cd ${IROOT}/ffead-cpp-src/ -ninja install diff --git a/docker/te/tekp/install_ffead-cpp-sql-raw-profiled.sh b/docker/te/tekp/install_ffead-cpp-sql-raw-profiled.sh deleted file mode 100644 index 721e5a77..00000000 --- a/docker/te/tekp/install_ffead-cpp-sql-raw-profiled.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/bin/bash - -chmod +x $IROOT/ffead-cpp-sql-raw/*.sh - -APP_CTXT="t3" -if [ "$1" = "async" ] -then - APP_CTXT="t4" -elif [ "$1" = "async-qw" ] -then - APP_CTXT="t5" -elif [ "$1" = "wire" ] -then - APP_CTXT="t6" -elif [ "$1" = "async-wire" ] -then - APP_CTXT="t7" -fi - -cp $IROOT/ffead-cpp-sql-raw/server.sh /server_orig.sh - -cd $IROOT/ffead-cpp-sql-raw -nohup bash -c "./server.sh > ffead.log &" -echo "Waiting for ffead-cpp to launch on port 8080..." -COUNTER=0 -while [ ! -f lib/libinter.so ] -do - sleep 1 - COUNTER=$((COUNTER+1)) - if [ "$COUNTER" = 600 ] - then - cat ffead.log - cat logs/jobs.log - echo "ffead-cpp exiting exiting due to failure...." - exit 1 - fi -done -COUNTER=0 -while [ ! -f lib/libdinter.so ] -do - sleep 1 - COUNTER=$((COUNTER+1)) - if [ "$COUNTER" = 120 ] - then - cat ffead.log - cat logs/jobs.log - echo "ffead-cpp exiting exiting due to failure....dlib" - exit 1 - fi -done -echo "ffead-cpp start successful" -sleep 20 -#cd tests && chmod +x *.sh && ./runTests.sh -#echo "ffead-cpp normal shutdown" -#cd - -rm -f serv.ctrl -pkill ffead-cpp - -#Start postgresql -service postgresql start -#For profiling/benchmarking - -sed -i 's|EVH_SINGLE=false|EVH_SINGLE=true|g' resources/server.prop -#sed -i 's|LOGGING_ENABLED=false|LOGGING_ENABLED=true|g' resources/server.prop - -sed -i 's|REQUEST_HANDLER=RequestReaderHandler|REQUEST_HANDLER=RequestHandler2|g' resources/server.prop -if [ "$1" = "async-qw" ] -then - sed -i 's|QUEUED_WRITES=false|QUEUED_WRITES=true|g' resources/server.prop -fi - -nohup bash -c "./server.sh > ffead.log &" -sleep 30 -echo "ffead-cpp with sql-raw support launched" -if [ "$1" != "async-qw" ] -then - wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 256 --timeout 8 -t 2 "http://localhost:8080/plaintext" - wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 256 --timeout 8 -t 2 "http://localhost:8080/${APP_CTXT}/j" -fi -wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 256 --timeout 8 -t 2 "http://localhost:8080/${APP_CTXT}/fortu" -wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/${APP_CTXT}/d" -if [ "$1" = "async" ] || [ "$1" = "async-qw" ] -then - wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/${APP_CTXT}/quem?queries=20" -else - wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/${APP_CTXT}/que_?queries=20" -fi -wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/${APP_CTXT}/quer?queries=20" -if [ "$1" = "async" ] || [ "$1" = "async-qw" ] -then - wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/${APP_CTXT}/updm?queries=20" -fi -wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/${APP_CTXT}/upd_?queries=20" -wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/${APP_CTXT}/updt?queries=20" - -echo "normal shutdown" -rm -f serv.ctrl -pkill ffead-cpp - -cd / - -exit 0 diff --git a/docker/te/tekp/install_ffead-cpp-sql-raw-v-picov-profiled.sh b/docker/te/tekp/install_ffead-cpp-sql-raw-v-picov-profiled.sh deleted file mode 100644 index ced00121..00000000 --- a/docker/te/tekp/install_ffead-cpp-sql-raw-v-picov-profiled.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash - -export FFEAD_CPP_PATH=${IROOT}/ffead-cpp-7.0-sql -export LD_LIBRARY_PATH=${IROOT}/:${IROOT}/lib:${FFEAD_CPP_PATH}/lib:/usr/local/lib:$LD_LIBRARY_PATH - -cd $IROOT/lang-server-backends/v/pico.v - -APP=t3 -if [ "$1" = "async" ] -then - APP=t4 - cp -f ${FFEAD_CPP_PATH}/web/t4/config/cachememory.xml ${FFEAD_CPP_PATH}/web/t4/config/cache.xml - sed -i 's|EVH_SINGLE=false|EVH_SINGLE=true|g' ${FFEAD_CPP_PATH}/resources/server.prop - nohup bash -c "./main --server_dir=$FFEAD_CPP_PATH --server_port=8080 --is_async=true > ffead.log &" -elif [ "$1" = "async-pool" ] -then - APP=t4 - cp -f ${FFEAD_CPP_PATH}/web/t4/config/cachememory.xml ${FFEAD_CPP_PATH}/web/t4/config/cache.xml - sed -i 's|EVH_SINGLE=false|EVH_SINGLE=true|g' ${FFEAD_CPP_PATH}/resources/server.prop - sed -i 's|"TeBkUmLpqAsyncRouter"|"TeBkUmLpqAsyncRouterPooled"|g' ${FFEAD_CPP_PATH}/web/t4/config/application.xml - sed -i 's|TeBkUmLpqAsyncRouter|TeBkUmLpqAsyncRouterPooled|g' ${FFEAD_CPP_PATH}/web/t4/config/cachememory.xml - nohup bash -c "./main --server_dir=$FFEAD_CPP_PATH --server_port=8080 --is_async=true > ffead.log &" -if [ "$1" = "wire" ] -then - APP=t6 - cp -f ${FFEAD_CPP_PATH}/web/t6/config/cachememory.xml ${FFEAD_CPP_PATH}/web/t6/config/cache.xml - sed -i 's|EVH_SINGLE=false|EVH_SINGLE=true|g' ${FFEAD_CPP_PATH}/resources/server.prop - nohup bash -c "./main --server_dir=$FFEAD_CPP_PATH --server_port=8080 --is_async=true > ffead.log &" -elif [ "$1" = "async-wire" ] -then - APP=t7 - cp -f ${FFEAD_CPP_PATH}/web/t7/config/cachememory.xml ${FFEAD_CPP_PATH}/web/t7/config/cache.xml - sed -i 's|EVH_SINGLE=false|EVH_SINGLE=true|g' ${FFEAD_CPP_PATH}/resources/server.prop - nohup bash -c "./main --server_dir=$FFEAD_CPP_PATH --server_port=8080 --is_async=true > ffead.log &" -else - cp -f ${FFEAD_CPP_PATH}/web/t3/config/cachememory.xml ${FFEAD_CPP_PATH}/web/t3/config/cache.xml - sed -i 's|"TeBkUmLpqRouter"|"TeBkUmLpqRouterPicoV"|g' ${FFEAD_CPP_PATH}/web/t3/config/application.xml - sed -i 's|EVH_SINGLE=false|EVH_SINGLE=true|g' ${FFEAD_CPP_PATH}/resources/server.prop - nohup bash -c "./main --server_dir=$FFEAD_CPP_PATH --server_port=8080 --is_async=false > ffead.log &" -fi - - -sleep 30 -echo "ffead-cpp-v-picov with sql-raw support launched" -if [ "$1" = "async" ] || [ "$1" = "async-pool" ] -then - wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 256 --timeout 8 -t 2 "http://localhost:8080/$APP/plaint" -else - wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 256 --timeout 8 -t 2 "http://localhost:8080/plaintext" -fi - -wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 256 --timeout 8 -t 2 "http://localhost:8080/$APP/j" -wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 256 --timeout 8 -t 2 "http://localhost:8080/$APP/fortu" -wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/$APP/d" -wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/$APP/quer?queries=20" -if [ "$1" = "async" ] || [ "$1" = "async-pool" ] -then - wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/$APP/quem?queries=20" -else - wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/$APP/que_?queries=20" -fi -wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/$APP/updt?queries=20" -wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/$APP/upd_?queries=20" -wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/$APP/cached-wld?count=20" -if [ "$1" = "async" ] || [ "$1" = "async-pool" ] -then - wrk -H 'Host: localhost' -H 'Accept: application/json,text/html;q=0.9,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7' \ - -H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/$APP/updm?queries=20" -fi -echo "normal shutdown" -pkill main - -cd / - -exit 0 diff --git a/docker/te/tekp/install_post_process.sh b/docker/te/tekp/install_post_process.sh deleted file mode 100644 index 53f6e9a7..00000000 --- a/docker/te/tekp/install_post_process.sh +++ /dev/null @@ -1,50 +0,0 @@ -cd ${IROOT}/ffead-cpp-src/ -if [ ! -d "ffead-cpp-7.0-bin" ] -then - exit 1 -fi - -cd ffead-cpp-7.0-bin -#cache related dockerfiles will add the cache.xml accordingly whenever needed -chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh -./server.sh & -COUNTER=0 -while [ ! -f lib/libinter.so ] -do - sleep 1 - COUNTER=$((COUNTER+1)) - if [ "$COUNTER" = 120 ] - then - cat logs/jobs.log - echo "ffead-cpp exiting exiting due to failure...." - exit 1 - fi -done -COUNTER=0 -while [ ! -f lib/libdinter.so ] -do - sleep 1 - COUNTER=$((COUNTER+1)) - if [ "$COUNTER" = 120 ] - then - cat logs/jobs.log - echo "ffead-cpp exiting exiting due to failure....ddlib" - exit 1 - fi -done -echo "ffead-cpp start successful" -sleep 20 -cd tests && rm -f test.csv && cp ${IROOT}/ffead-cpp-src/tests/test-te.csv test.csv && chmod +x *.sh && ./runTests.sh -echo "ffead-cpp normal shutdown" -pkill ffead-cpp - -cd ${IROOT}/ffead-cpp-src/ -cp -rf ffead-cpp-7.0-bin ${IROOT}/ffead-cpp-7.0-sql -rm -rf ffead-cpp-7.0-bin - -cd ${IROOT}/ffead-cpp-7.0-sql - -chmod 755 *.sh resources/*.sh rtdcf/autotools/*.sh -chmod 755 *.sh -rm -f *.cntrl -rm -f tmp/*.sess \ No newline at end of file diff --git a/docker/te/tekp/run_ffead.sh b/docker/te/tekp/run_ffead.sh deleted file mode 100644 index 7a27d0b6..00000000 --- a/docker/te/tekp/run_ffead.sh +++ /dev/null @@ -1,332 +0,0 @@ -#!/bin/bash - -rm -f /usr/local/lib/libffead-* -rm -f /usr/local/lib/libt1.so* -rm -f /usr/local/lib/libt2.so* -rm -f /usr/local/lib/libt3.so* -rm -f /usr/local/lib/libt4.so* -rm -f /usr/local/lib/libt5.so* -rm -f /usr/local/lib/libt6.so* -rm -f /usr/local/lib/libt7.so* -rm -f /usr/local/lib/libinter.so -rm -f /usr/local/lib/libdinter.so - -export FFEAD_CPP_PATH=${IROOT}/$1 - -ln -s ${FFEAD_CPP_PATH}/lib/libt1.so /usr/local/lib/libt1.so -ln -s ${FFEAD_CPP_PATH}/lib/libt2.so /usr/local/lib/libt2.so -ln -s ${FFEAD_CPP_PATH}/lib/libt3.so /usr/local/lib/libt3.so -ln -s ${FFEAD_CPP_PATH}/lib/libt4.so /usr/local/lib/libt4.so -ln -s ${FFEAD_CPP_PATH}/lib/libt5.so /usr/local/lib/libt5.so -ln -s ${FFEAD_CPP_PATH}/lib/libt4.so /usr/local/lib/libt6.so -ln -s ${FFEAD_CPP_PATH}/lib/libt5.so /usr/local/lib/libt7.so -ln -s ${FFEAD_CPP_PATH}/lib/libffead-modules.so /usr/local/lib/libffead-modules.so -ln -s ${FFEAD_CPP_PATH}/lib/libffead-framework.so /usr/local/lib/libffead-framework.so -ln -s ${FFEAD_CPP_PATH}/lib/libinter.so /usr/local/lib/libinter.so -ln -s ${FFEAD_CPP_PATH}/lib/libdinter.so /usr/local/lib/libdinter.so -ldconfig - -echo never > /sys/kernel/mm/transparent_hugepage/enabled -echo 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' >> /etc/rc.local -sysctl vm.overcommit_memory=1 - -if [ "$2" = "nginx" ] -then - if [ "$3" = "mysql" ] || [ "$3" = "postgresql" ] - then - export PATH=${IROOT}/nginx-ffead-sql/sbin:${PATH} - else - export PATH=${IROOT}/nginx-ffead-mongo/sbin:${PATH} - fi -fi - -export LD_LIBRARY_PATH=${IROOT}/:${IROOT}/lib:${FFEAD_CPP_PATH}/lib:/usr/local/lib:$LD_LIBRARY_PATH -export ODBCINI=${IROOT}/odbc.ini -export ODBCSYSINI=${IROOT} -export LD_PRELOAD=/usr/local/lib/libmimalloc.so -#export LD_PRELOAD=$IROOT/snmalloc-0.6.0/build/libsnmallocshim.so - -cd $FFEAD_CPP_PATH - -#use below settings only for debugging -#echo '/tmp/core.%h.%e.%t' > /proc/sys/kernel/core_pattern -#ulimit -c unlimited -ulimit -l unlimited - -service redis-server stop -service apache2 stop -service memcached stop - -if [ "$3" = "mongo" ] -then - WEB_DIR=$FFEAD_CPP_PATH/web/t1 - rm -rf web/t2 web/t3 web/t4 web/t5 web/t6 web/t7 - cp -f ${WEB_DIR}/config/sdormmongo.xml ${WEB_DIR}/config/sdorm.xml -elif [ "$3" = "mongo-raw" ] -then - WEB_DIR=$FFEAD_CPP_PATH/web/t2 - rm -rf web/t1 web/t3 web/t4 web/t5 web/t6 web/t7 -elif [ "$3" = "mysql" ] -then - WEB_DIR=$FFEAD_CPP_PATH/web/t1 - rm -rf web/t2 web/t3 web/t4 web/t5 web/t6 web/t7 - cp -f ${WEB_DIR}/config/sdormmysql.xml ${WEB_DIR}/config/sdorm.xml -elif [ "$3" = "postgresql" ] -then - WEB_DIR=$FFEAD_CPP_PATH/web/t1 - rm -rf web/t2 web/t3 web/t4 web/t5 web/t6 web/t7 - cp -f web/t1/config/sdormpostgresql.xml web/t1/config/sdorm.xml -elif [ "$3" = "postgresql-raw" ] -then - WEB_DIR=$FFEAD_CPP_PATH/web/t3 - rm -rf web/t1 web/t2 web/t4 web/t5 web/t6 web/t7 - sed -i 's|true|false|g' ${WEB_DIR}/config/sdorm.xml -elif [ "$3" = "postgresql-raw-async" ] -then - WEB_DIR=$FFEAD_CPP_PATH/web/t4 - rm -rf web/t1 web/t2 web/t3 web/t5 web/t6 web/t7 - sed -i 's|false|true|g' ${WEB_DIR}/config/sdorm.xml -elif [ "$3" = "postgresql-wire" ] -then - WEB_DIR=$FFEAD_CPP_PATH/web/t6 - rm -rf web/t1 web/t2 web/t3 web/t4 web/t5 web/t7 - sed -i 's|true|false|g' ${WEB_DIR}/config/sdorm.xml - sed -i 's|false|true|g' ${WEB_DIR}/config/sdorm.xml -elif [ "$3" = "postgresql-wire-async" ] -then - WEB_DIR=$FFEAD_CPP_PATH/web/t7 - rm -rf web/t1 web/t2 web/t3 web/t4 web/t5 web/t6 - sed -i 's|false|true|g' ${WEB_DIR}/config/sdorm.xml - sed -i 's|false|true|g' ${WEB_DIR}/config/sdorm.xml -elif [ "$3" = "postgresql-raw-async-qw" ] -then - WEB_DIR=$FFEAD_CPP_PATH/web/t5 - rm -rf web/t1 web/t2 web/t3 web/t4 web/t6 web/t7 - sed -i 's|false|true|g' ${WEB_DIR}/config/sdorm.xml -else - WEB_DIR=$FFEAD_CPP_PATH/web/t1 - rm -rf web/t2 web/t3 web/t4 web/t5 web/t6 web/t7 -fi - -if [ "$5" = "batch" ] -then - sed -i 's|false|true|g' ${WEB_DIR}/config/sdorm.xml -fi - -if [ "$3" != "postgresql-raw-async-qw" ] -then - if [ "$4" = "memory" ] - then - cp -f ${WEB_DIR}/config/cachememory.xml ${WEB_DIR}/config/cache.xml - elif [ "$4" = "redis" ] - then - service redis-server start - cp -f ${WEB_DIR}/config/cacheredis.xml ${WEB_DIR}/config/cache.xml - elif [ "$4" = "memcached" ] - then - service memcached start - cp -f ${WEB_DIR}/config/cachememcached.xml ${WEB_DIR}/config/cache.xml - fi -fi -if [ "$6" = "pool" ] -then - if [[ $3 == *"-async"* ]]; then - sed -i 's|"TeBkUmLpqAsyncRouter"|"TeBkUmLpqAsyncRouterPooled"|g' ${WEB_DIR}/config/application.xml - sed -i 's|TeBkUmLpqAsyncRouter|TeBkUmLpqAsyncRouterPooled|g' ${WEB_DIR}/config/cache.xml - if [ "$3" = "postgresql-raw-async-qw" ] - then - sed -i 's|"TeBkUmLpqQwAsyncRouter"|"TeBkUmLpqQwAsyncRouterPooled"|g' ${WEB_DIR}/config/application.xml - fi - fi -fi - -rm -f rtdcf/*.d rtdcf/*.o -rm -f *.cntrl -rm -f tmp/*.sess -if [ ! -d tmp ]; then -mkdir tmp -fi -chmod 700 ffead-cpp* -chmod 700 resources/*.sh -chmod 700 tests/* -chmod 700 rtdcf/* - -sed -i 's|localhost|tfb-database|g' ${WEB_DIR}/config/sdorm.xml - -if [ "$2" = "apache" ] -then - sed -i 's|30|3|g' ${WEB_DIR}/config/sdorm.xml - sed -i 's|10|2|g' ${WEB_DIR}/config/cache.xml -elif [ "$2" = "nginx" ] -then - sed -i 's|30|3|g' ${WEB_DIR}/config/sdorm.xml - sed -i 's|10|2|g' ${WEB_DIR}/config/cache.xml -fi - -if [ "$2" = "emb" ] -then - sed -i 's|EVH_SINGLE=false|EVH_SINGLE=true|g' $FFEAD_CPP_PATH/resources/server.prop - sed -i 's|REQUEST_HANDLER=RequestReaderHandler|REQUEST_HANDLER=RequestHandler2|g' $FFEAD_CPP_PATH/resources/server.prop - sed -i 's|LAZY_HEADER_PARSE=false|LAZY_HEADER_PARSE=true|g' $FFEAD_CPP_PATH/resources/server.prop - if [ "$3" = "postgresql-raw-async-qw" ] - then - sed -i 's|QUEUED_WRITES=false|QUEUED_WRITES=true|g' $FFEAD_CPP_PATH/resources/server.prop - fi - for i in $(seq 0 $(($(taskset 1 getconf _NPROCESSORS_ONLN)-1))); do - taskset -c $i ./ffead-cpp $FFEAD_CPP_PATH & - done -elif [ "$2" = "lithium" ] -then - ./ffead-cpp-lithium $FFEAD_CPP_PATH & -elif [ "$2" = "cinatra" ] -then - ./ffead-cpp-cinatra $FFEAD_CPP_PATH & -elif [ "$2" = "drogon" ] -then - ./ffead-cpp-drogon $FFEAD_CPP_PATH & -elif [ "$2" = "apache" ] -then - if [ "$3" = "mysql" ] || [ "$3" = "postgresql" ] - then - sed -i 's|/installs/ffead-cpp-7.0|'/installs/ffead-cpp-7.0-sql'|g' /etc/apache2/apache2.conf - sed -i 's|/installs/ffead-cpp-7.0|'/installs/ffead-cpp-7.0-sql'|g' /etc/apache2/sites-enabled/000-default.conf /etc/apache2/sites-enabled/ffead-site.conf - fi - apachectl -D FOREGROUND -elif [ "$2" = "nginx" ] -then - mkdir -p ${IROOT}/nginxfc/logs - if [ "$3" = "mysql" ] || [ "$3" = "postgresql" ] - then - nginx -g 'daemon off;' -c ${IROOT}/nginx-ffead-sql/conf/nginx.conf - else - nginx -g 'daemon off;' -c ${IROOT}/nginx-ffead-mongo/conf/nginx.conf - fi -elif [ "$2" = "libreactor" ] -then - cd ${IROOT} - ./libreactor-ffead-cpp $FFEAD_CPP_PATH 8080 -elif [ "$2" = "h2o" ] -then - cd ${IROOT}/lang-server-backends/c/h2o - ./h2o.sh ${FFEAD_CPP_PATH} ${LD_LIBRARY_PATH} 8080 -elif [ "$2" = "crystal-http" ] -then - cd ${IROOT} - for i in $(seq 0 $(($(taskset 1 getconf _NPROCESSORS_ONLN)-1))); do - taskset -c $i ./crystal-ffead-cpp.out --ffead-cpp-dir=$FFEAD_CPP_PATH --to=8080 & - done -elif [ "$2" = "crystal-h2o" ] -then - cd ${IROOT} - for i in $(seq 0 $(($(taskset 1 getconf _NPROCESSORS_ONLN)-1))); do - taskset -c $i ./h2o-evloop-ffead-cpp.out --ffead-cpp-dir=$FFEAD_CPP_PATH --to=8080 & - done -elif [ "$2" = "julia-http" ] -then - for i in $(seq 0 $(($(taskset 1 getconf _NPROCESSORS_ONLN)-1))); do - julia ${IROOT}/lang-server-backends/julia/http.jl/server.jl $FFEAD_CPP_PATH - done -elif [ "$2" = "swift-nio" ] -then - cd ${IROOT} - ./app $FFEAD_CPP_PATH -elif [ "$2" = "d-hunt" ] -then - cd ${IROOT} - ./hunt-minihttp -s $FFEAD_CPP_PATH -elif [ "$2" = "rust-actix" ] -then - cd ${IROOT} - ./actix-ffead-cpp $FFEAD_CPP_PATH 8080 -elif [ "$2" = "rust-hyper" ] -then - cd ${IROOT} - ./hyper-ffead-cpp $FFEAD_CPP_PATH 8080 -elif [ "$2" = "rust-thruster" ] -then - cd ${IROOT} - ./thruster-ffead-cpp $FFEAD_CPP_PATH 8080 -elif [ "$2" = "rust-rocket" ] -then - cd ${IROOT} - ./rocket-ffead-cpp $FFEAD_CPP_PATH 8080 -elif [ "$2" = "go-fasthttp" ] -then - cd ${IROOT} - ./fasthttp-ffead-cpp --server_directory=$FFEAD_CPP_PATH -addr=8080 -elif [ "$2" = "go-gnet" ] -then - cd ${IROOT} - ./gnet-ffead-cpp --server_directory=$FFEAD_CPP_PATH --port=8080 -elif [ "$2" = "v-vweb" ] -then - cd ${IROOT} - for i in $(seq 0 $(($(taskset 1 getconf _NPROCESSORS_ONLN)-1))); do - taskset -c $i ./vweb --server_dir=$FFEAD_CPP_PATH --server_port=8080 & - done -elif [ "$2" = "v-picov" ] -then - cd ${IROOT} - sed -i 's|EVH_SINGLE=false|EVH_SINGLE=true|g' $FFEAD_CPP_PATH/resources/server.prop - if [[ $3 == *"-async"* ]] - then - rm -f ${WEB_DIR}/config/cache.xml - for i in $(seq 0 $(($(taskset 1 getconf _NPROCESSORS_ONLN)-1))); do - if [ "$6" = "pool" ] - then - if [ -f "main_async_pool" ] - then - taskset -c $i ./main_async_pool --server_dir=$FFEAD_CPP_PATH --server_port=8080 --is_async=true & - else - taskset -c $i ./main_async --server_dir=$FFEAD_CPP_PATH --server_port=8080 --is_async=true & - fi - else - taskset -c $i ./main_async --server_dir=$FFEAD_CPP_PATH --server_port=8080 --is_async=true & - fi - done - else - sed -i 's|"TeBkUmLpqRouter"|"TeBkUmLpqRouterPicoV"|g' ${WEB_DIR}/config/application.xml - sed -i 's|"TeBkUmFpgRouter"|"TeBkUmFpgRouterPicoV"|g' ${WEB_DIR}/config/application.xml - for i in $(seq 0 $(($(taskset 1 getconf _NPROCESSORS_ONLN)-1))); do - taskset -c $i ./main --server_dir=$FFEAD_CPP_PATH --server_port=8080 --is_async=false & - done - fi -elif [ "$2" = "java-firenio" ] -then - cd ${IROOT} - java \ - -server \ - -XX:+UseNUMA \ - -XX:+UseParallelGC \ - -Dlite=false \ - -Dcore=1 \ - -Dframe=16 \ - -DreadBuf=512 \ - -Dpool=true \ - -Ddirect=true \ - -Dinline=true \ - -Dlevel=1 \ - -Dread=false \ - -Depoll=true \ - -Dnodelay=true \ - -Dcachedurl=false \ - -DunsafeBuf=true \ - -classpath firenio-ffead-cpp-0.1-jar-with-dependencies.jar com.firenio.ffeadcpp.FirenioFfeadCppServer $FFEAD_CPP_PATH 8080 -elif [ "$2" = "java-rapidoid" ] -then - cd ${IROOT} - java -server -XX:+UseNUMA -XX:+UseParallelGC \ - -classpath rapidoid-ffead-cpp-1.0-jar-with-dependencies.jar \ - com.rapidoid.ffeadcpp.Main $FFEAD_CPP_PATH 8080 profiles=production -elif [ "$2" = "java-wizzardo-http" ] -then - cd ${IROOT} - java -Xmx2G -Xms2G -server -XX:+UseNUMA -XX:+UseParallelGC \ - -jar wizzardo-ffead-cpp-all-1.0.jar $FFEAD_CPP_PATH 8080 env=prod -elif [ "$2" = "seastar" ] -then - cd ${IROOT}/lang-server-backends/c++/seastar - ./ffead-cpp-seastar --port=8080 --address=0.0.0.0 --fcpdir=${FFEAD_CPP_PATH} -c$(nproc) -fi - -wait diff --git a/docker/te/tekp/server.sh b/docker/te/tekp/server.sh deleted file mode 100644 index da796bbe..00000000 --- a/docker/te/tekp/server.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -export MALLOC_CHECK_=0 -IS_OS_DARWIN=`uname|tr '[A-Z]' '[a-z]'|awk 'index($0,"darwin") != 0 {print "darwin"}'` -if [ "$IS_OS_DARWIN" != "" ]; then - export FFEAD_CPP_PATH=`cd "$(dirname server.sh)" && ABSPATH=$(pwd) && cd -` -else - export FFEAD_CPP_PATH=`echo $(dirname $(readlink -f $0))` -fi - -export ODBCINI=${IROOT}/odbc.ini -export ODBCSYSINI=${IROOT} -echo $FFEAD_CPP_PATH -export LD_LIBRARY_PATH=${IROOT}/:${IROOT}/lib:$FFEAD_CPP_PATH/lib:/usr/local/lib:$LD_LIBRARY_PATH -echo $LD_LIBRARY_PATH -export PATH=$FFEAD_CPP_PATH/lib:$PATH -echo $PATH -rm -f $FFEAD_CPP_PATH/rtdcf/*.d $FFEAD_CPP_PATH/rtdcf/*.o -rm -f $FFEAD_CPP_PATH/*.cntrl -rm -f $FFEAD_CPP_PATH/tmp/*.sess -if [ ! -d tmp ]; then -mkdir tmp -fi -chmod 700 $FFEAD_CPP_PATH/ffead-cpp -if [ -d $FFEAD_CPP_PATH/ffead-cpp-lithium ]; then -chmod 700 $FFEAD_CPP_PATH/ffead-cpp-lithium -fi -if [ -d $FFEAD_CPP_PATH/ffead-cpp-cinatra ]; then -chmod 700 $FFEAD_CPP_PATH/ffead-cpp-cinatra -fi -if [ -d $FFEAD_CPP_PATH/ffead-cpp-drogon ]; then -chmod 700 $FFEAD_CPP_PATH/ffead-cpp-drogon -fi -chmod 700 $FFEAD_CPP_PATH/resources/*.sh -chmod 700 $FFEAD_CPP_PATH/tests/* -chmod 700 $FFEAD_CPP_PATH/rtdcf/* -#chmod 700 $FFEAD_CPP_PATH/rtdcf/autotools/* -#/usr/sbin/setenforce 0 -./ffead-cpp $FFEAD_CPP_PATH > ffead.log 2>&1 \ No newline at end of file diff --git a/docker/te/tekp/sql-async-profiled-install.sh b/docker/te/tekp/sql-async-profiled-install.sh deleted file mode 100644 index cc25f8a6..00000000 --- a/docker/te/tekp/sql-async-profiled-install.sh +++ /dev/null @@ -1,36 +0,0 @@ -cd $IROOT/ffead-cpp-src/ - -rm -rf build -mkdir build -cd build -CXXFLAGS="-march=native -flto -fprofile-dir=/tmp/profile-data -fprofile-generate" cmake -DSRV_EMB=on -DMOD_MEMCACHED=on -DMOD_REDIS=on -DMOD_SDORM_MONGO=on -DWITH_RAPIDJSON=on -DWITH_PUGIXML=on -GNinja ${BUILD_EXT_OPTS} .. -ninja install && mv $IROOT/ffead-cpp-src/ffead-cpp-7.0-bin $IROOT/ffead-cpp-sql-raw - -#Start postgresql -service postgresql stop -#For profiling/benchmarking - -cd $IROOT/ -#sed -i 's|cmake |cmake -DCMAKE_EXE_LINKER_FLAGS="-fprofile-dir=/tmp/profile-data -fprofile-generate" -DCMAKE_CXX_FLAGS="-march=native -fprofile-dir=/tmp/profile-data -fprofile-generate" |g' $IROOT/ffead-cpp-sql-raw/resources/rundyn-automake.sh -./install_ffead-cpp-sql-raw-profiled.sh ${2} -rm -rf $IROOT/ffead-cpp-sql-raw - -cd $IROOT/ffead-cpp-src -rm -rf build -mkdir build -cd build -CXXFLAGS="-march=native -flto -fprofile-dir=/tmp/profile-data -fprofile-use=/tmp/profile-data -fprofile-correction" cmake -DSRV_EMB=on -DMOD_MEMCACHED=on -DMOD_REDIS=on -DMOD_SDORM_MONGO=on -DWITH_RAPIDJSON=on -DWITH_PUGIXML=on -GNinja ${BUILD_EXT_OPTS} .. -ninja install && mv $IROOT/ffead-cpp-src/ffead-cpp-7.0-bin $IROOT/ffead-cpp-sql-raw - -#Start postgresql -service postgresql stop -#For profiling/benchmarking - -cd $IROOT/ -#sed -i 's|cmake |CXXFLAGS="-march=native -fprofile-dir=/tmp/profile-data -fprofile-use -fprofile-correction" cmake |g' $IROOT/ffead-cpp-sql-raw/resources/rundyn-automake.sh -./install_ffead-cpp-sql-raw-profiled.sh ${2} -mv $IROOT/ffead-cpp-sql-raw $IROOT/ffead-cpp-7.0${1} - -sed -i 's|localhost|tfb-database|g' $IROOT/ffead-cpp-7.0${1}/web/t4/config/sdorm.xml -sed -i 's|localhost|tfb-database|g' $IROOT/ffead-cpp-7.0${1}/web/t5/config/sdorm.xml -sed -i 's|localhost|tfb-database|g' $IROOT/ffead-cpp-7.0${1}/web/t7/config/sdorm.xml diff --git a/docker/te/tekp/sql-profiled-install.sh b/docker/te/tekp/sql-profiled-install.sh deleted file mode 100644 index 0c557336..00000000 --- a/docker/te/tekp/sql-profiled-install.sh +++ /dev/null @@ -1,36 +0,0 @@ -cd $IROOT/ffead-cpp-src/ - -rm -rf $IROOT/ffead-cpp-sql-raw - -rm -rf build -mkdir build -cd build -CXXFLAGS="-march=native -flto -fprofile-dir=/tmp/profile-data -fprofile-generate" cmake -DSRV_EMB=on -DMOD_MEMCACHED=on -DMOD_REDIS=on -DMOD_SDORM_MONGO=off -DWITH_RAPIDJSON=on -DWITH_PUGIXML=on -GNinja ${BUILD_EXT_OPTS} .. -ninja install && mv $IROOT/ffead-cpp-src/ffead-cpp-7.0-bin $IROOT/ffead-cpp-sql-raw - -#Start postgresql -service postgresql stop -#For profiling/benchmarking - -cd $IROOT/ -#sed -i 's|cmake |cmake -DCMAKE_EXE_LINKER_FLAGS="-fprofile-dir=/tmp/profile-data -fprofile-generate" -DCMAKE_CXX_FLAGS="-march=native -fprofile-dir=/tmp/profile-data -fprofile-generate" |g' $IROOT/ffead-cpp-sql-raw/resources/rundyn-automake.sh -./install_ffead-cpp-sql-raw-profiled.sh -rm -rf $IROOT/ffead-cpp-sql-raw - -cd $IROOT/ffead-cpp-src -rm -rf build -mkdir build -cd build -CXXFLAGS="-march=native -flto -fprofile-dir=/tmp/profile-data -fprofile-use=/tmp/profile-data -fprofile-correction" cmake -DSRV_EMB=on -DMOD_MEMCACHED=on -DMOD_REDIS=on -DMOD_SDORM_MONGO=off -DWITH_RAPIDJSON=on -DWITH_PUGIXML=on -GNinja ${BUILD_EXT_OPTS} .. -ninja install && mv $IROOT/ffead-cpp-src/ffead-cpp-7.0-bin $IROOT/ffead-cpp-sql-raw - -#Start postgresql -service postgresql stop -#For profiling/benchmarking - -cd $IROOT/ -#sed -i 's|cmake |CXXFLAGS="-march=native -fprofile-dir=/tmp/profile-data -fprofile-use -fprofile-correction" cmake |g' $IROOT/ffead-cpp-sql-raw/resources/rundyn-automake.sh -./install_ffead-cpp-sql-raw-profiled.sh -mv $IROOT/ffead-cpp-sql-raw $IROOT/ffead-cpp-7.0${1} - -sed -i 's|localhost|tfb-database|g' $IROOT/ffead-cpp-7.0${1}/web/t3/config/sdorm.xml diff --git a/docker/te/tekp/sql-profiled-util.sh b/docker/te/tekp/sql-profiled-util.sh deleted file mode 100644 index fed50662..00000000 --- a/docker/te/tekp/sql-profiled-util.sh +++ /dev/null @@ -1,112 +0,0 @@ -mkdir /tmp/profile-data - -rm -rf $IROOT/ffead-cpp-7.0-sql - -if [ "$1" = "batch-experimental-unused" ] -then - apt remove -yqq libpq-dev - apt autoremove -yqq - rm -f /usr/local/lib/libpq.* - rm -f /usr/include/postgres_ext.h /usr/include/pg_config_ext.h /usr/include/libpq-fe.h - rm -f /usr/lib/x86_64-linux-gnu/libpq.* - cd /tmp - #wget -q https://github.com/an-tao/postgres/archive/batch_mode_ubuntu.tar.gz - #tar -xzf batch_mode_ubuntu.tar.gz - #cd postgres-batch_mode_ubuntu - #./configure --prefix=/usr CFLAGS='-O2 -pipe -march=native' - #make && make install - wget -nv https://github.com/postgres/postgres/archive/b787d4ce6d910080065025bcd5f968544997271f.zip - unzip -q b787d4ce6d910080065025bcd5f968544997271f.zip - cd postgres-b787d4ce6d910080065025bcd5f968544997271f - wget -nv https://www.postgresql.org/message-id/attachment/115223/v22-0001-libpq-batch.patch - git apply ./v22-0001-libpq-batch.patch - ./configure --prefix=/usr CFLAGS='-O3 -march=native -flto' - cd src/interfaces/libpq - make all install -j4 - cp ../../../src/include/postgres_ext.h ../../../src/include/pg_config_ext.h libpq-fe.h /usr/include -fi - -if [ "$1" = "batch-old-commit-unused" ] -then - apt remove -yqq libpq-dev - apt autoremove -yqq - rm -f /usr/local/lib/libpq.* - rm -f /usr/include/postgres_ext.h /usr/include/pg_config_ext.h /usr/include/libpq-fe.h - rm -f /usr/lib/x86_64-linux-gnu/libpq.* - PG_CMT=514b4c11d24701d2cc90ad75ed787bf1380af673 - wget -nv https://github.com/postgres/postgres/archive/$PG_CMT.zip - unzip -q $PG_CMT.zip - cd postgres-$PG_CMT - ./configure --prefix=/usr CFLAGS='-O3 -march=native -flto' - cd src/interfaces/libpq - make all install -j4 - cp ../../../src/include/postgres_ext.h ../../../src/include/pg_config_ext.h /usr/include -fi - -if [ "$2" = "clang" ] -then - apt update -yqq && apt install -yqq clang -fi - -cd $IROOT/ffead-cpp-src/ -rm -rf CMakeCache.txt CMakeFiles -rm -rf web/t1 web/t2 - -sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t1)||g' CMakeLists.txt -sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t2)||g' CMakeLists.txt -sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t1/libt1${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt -sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t2/libt2${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt - -if [ "$3" = "async" ] -then - sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t3)||g' CMakeLists.txt - sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t3/libt3${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt - sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t6)||g' CMakeLists.txt - sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t6/libt6${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt - sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t7)||g' CMakeLists.txt - sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t7/libt7${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt - sed -i 's|tfb-database|localhost|g' $IROOT/ffead-cpp-src/web/t4/config/sdorm.xml - sed -i 's|tfb-database|localhost|g' $IROOT/ffead-cpp-src/web/t5/config/sdorm.xml - rm -rf web/t3 web/t6 web/t7 - if [ "$4" = "pool" ] - then - sed -i 's|"TeBkUmLpqAsyncRouter"|"TeBkUmLpqAsyncRouterPooled"|g' $IROOT/ffead-cpp-src/web/t4/config/application.xml - sed -i 's|TeBkUmLpqAsyncRouter|TeBkUmLpqAsyncRouterPooled|g' $IROOT/ffead-cpp-src/web/t4/config/cachememory.xml - sed -i 's|"TeBkUmLpqQwAsyncRouter"|"TeBkUmLpqQwAsyncRouterPooled"|g' $IROOT/ffead-cpp-src/web/t5/config/application.xml - fi -elif [ "$3" = "wire" ] -then - sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t3)||g' CMakeLists.txt - sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t3/libt3${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt - sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t4)||g' CMakeLists.txt - sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t4/libt4${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt - sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t5)||g' CMakeLists.txt - sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t5/libt5${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt - sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t7)||g' CMakeLists.txt - sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t7/libt7${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt - sed -i 's|tfb-database|localhost|g' $IROOT/ffead-cpp-src/web/t6/config/sdorm.xml - rm -rf web/t3 web/t4 web/t5 web/t7 -elif [ "$3" = "async-wire" ] -then - sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t3)||g' CMakeLists.txt - sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t3/libt3${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt - sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t4)||g' CMakeLists.txt - sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t4/libt4${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt - sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t5)||g' CMakeLists.txt - sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t5/libt5${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt - sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t6)||g' CMakeLists.txt - sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t6/libt6${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt - sed -i 's|tfb-database|localhost|g' $IROOT/ffead-cpp-src/web/t7/config/sdorm.xml - rm -rf web/t3 web/t4 web/t5 web/t6 -else - sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t4)||g' CMakeLists.txt - sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t4/libt4${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt - sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t5)||g' CMakeLists.txt - sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t5/libt5${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt - sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t6)||g' CMakeLists.txt - sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t6/libt6${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt - sed -i 's|add_subdirectory(${PROJECT_SOURCE_DIR}/web/t7)||g' CMakeLists.txt - sed -i 's|install(FILES ${PROJECT_BINARY_DIR}/web/t7/libt7${LIB_EXT} DESTINATION ${PROJECT_NAME}-bin/lib)||g' CMakeLists.txt - sed -i 's|tfb-database|localhost|g' $IROOT/ffead-cpp-src/web/t3/config/sdorm.xml - rm -rf web/t4 web/t5 web/t6 web/t7 -fi \ No newline at end of file diff --git a/docker/te/tekp/sql-v-picov-profiled-install.sh b/docker/te/tekp/sql-v-picov-profiled-install.sh deleted file mode 100644 index 0510b9c1..00000000 --- a/docker/te/tekp/sql-v-picov-profiled-install.sh +++ /dev/null @@ -1,63 +0,0 @@ -export FFEAD_CPP_PATH=${IROOT}/ffead-cpp-7.0-sql -export LD_LIBRARY_PATH=${IROOT}/:${IROOT}/lib:${FFEAD_CPP_PATH}/lib:/usr/local/lib:$LD_LIBRARY_PATH - -if [ "$1" = "async" ] -then - rm -rf $FFEAD_CPP_PATH/web/t1 $FFEAD_CPP_PATH/web/t2 $FFEAD_CPP_PATH/web/t3 $FFEAD_CPP_PATH/web/t5 $FFEAD_CPP_PATH/web/t6 $FFEAD_CPP_PATH/web/t7 - sed -i 's|false|true|g' $FFEAD_CPP_PATH/web/t4/config/sdorm.xml - sed -i 's|tfb-database|localhost|g' $FFEAD_CPP_PATH/web/t4/config/sdorm.xml -elif [ "$1" = "async-pool" ] -then - rm -rf $FFEAD_CPP_PATH/web/t1 $FFEAD_CPP_PATH/web/t2 $FFEAD_CPP_PATH/web/t3 $FFEAD_CPP_PATH/web/t4 $FFEAD_CPP_PATH/web/t6 $FFEAD_CPP_PATH/web/t7 - sed -i 's|false|true|g' $FFEAD_CPP_PATH/web/t5/config/sdorm.xml - sed -i 's|tfb-database|localhost|g' $FFEAD_CPP_PATH/web/t5/config/sdorm.xml -elif [ "$1" = "wire" ] -then - rm -rf $FFEAD_CPP_PATH/web/t1 $FFEAD_CPP_PATH/web/t2 $FFEAD_CPP_PATH/web/t3 $FFEAD_CPP_PATH/web/t4 $FFEAD_CPP_PATH/web/t5 $FFEAD_CPP_PATH/web/t7 - sed -i 's|false|true|g' $FFEAD_CPP_PATH/web/t6/config/sdorm.xml - sed -i 's|tfb-database|localhost|g' $FFEAD_CPP_PATH/web/t6/config/sdorm.xml - sed -i 's|false|true|g' $FFEAD_CPP_PATH/web/t6/config/sdorm.xml -elif [ "$1" = "async-wire" ] -then - rm -rf $FFEAD_CPP_PATH/web/t1 $FFEAD_CPP_PATH/web/t2 $FFEAD_CPP_PATH/web/t3 $FFEAD_CPP_PATH/web/t4 $FFEAD_CPP_PATH/web/t5 $FFEAD_CPP_PATH/web/t6 - sed -i 's|false|true|g' $FFEAD_CPP_PATH/web/t7/config/sdorm.xml - sed -i 's|tfb-database|localhost|g' $FFEAD_CPP_PATH/web/t7/config/sdorm.xml - sed -i 's|false|true|g' $FFEAD_CPP_PATH/web/t7/config/sdorm.xml -else - rm -rf $FFEAD_CPP_PATH/web/t1 $FFEAD_CPP_PATH/web/t2 $FFEAD_CPP_PATH/web/t4 $FFEAD_CPP_PATH/web/t5 $FFEAD_CPP_PATH/web/t6 $FFEAD_CPP_PATH/web/t7 - sed -i 's|tfb-database|localhost|g' ${FFEAD_CPP_PATH}/web/t3/config/sdorm.xml - sed -i 's|"TeBkUmLpqRouter"|"TeBkUmLpqRouterPicoV"|g' ${FFEAD_CPP_PATH}/web/t3/config/application.xml -fi - - -cd $IROOT/lang-server-backends/v/pico.v -v -enable-globals -prod -cflags '-std=gnu11 -Wall -O3 -march=native -mtune=native -no-pie -flto -fprofile-dir=/tmp/profile-data -fprofile-generate -lgcov --coverage' main.v - -#Start postgresql -service postgresql start -#For profiling/benchmarking - -cd $IROOT/ -./install_ffead-cpp-sql-raw-v-picov-profiled.sh "$1" - -cd $IROOT/lang-server-backends/v/pico.v -v -enable-globals -prod -cflags '-std=gnu11 -Wall -O3 -march=native -mtune=native -no-pie -flto -fprofile-dir=/tmp/profile-data -fprofile-use=/tmp/profile-data -fprofile-correction -lgcov --coverage' main.v - -cd $IROOT/ -./install_ffead-cpp-sql-raw-v-picov-profiled.sh "$1" - -if [ "$1" = "async" ] || [ "$1" = "async-wire" ] -then - sed -i 's|localhost|tfb-database|g' $IROOT/ffead-cpp-7.0-sql/web/t4/config/sdorm.xml - mv $IROOT/lang-server-backends/v/pico.v/main $IROOT/main_async -elif [ "$1" = "async-pool" ] -then - sed -i 's|localhost|tfb-database|g' $IROOT/ffead-cpp-7.0-sql/web/t4/config/sdorm.xml - mv $IROOT/lang-server-backends/v/pico.v/main $IROOT/main_async_pool -else - sed -i 's|localhost|tfb-database|g' $IROOT/ffead-cpp-7.0-sql/web/t3/config/sdorm.xml - mv $IROOT/lang-server-backends/v/pico.v/main $IROOT/ -fi - -apt remove -yqq postgresql-${PG_VERSION} postgresql-contrib-${PG_VERSION} gnupg lsb-release && apt autoremove -yqq -rm -rf /ssd/postgresql && rm -rf /tmp/postgresql && rm -rf /tmp/wrk /usr/local/bin/wrk