Skip to content

Commit 67a3132

Browse files
Removed some tests + Performance optimizations (#6167)
* Removed some tests Performance optimizations * Disabled lot of unrequired tests
1 parent 3c243da commit 67a3132

19 files changed

+830
-324
lines changed

frameworks/C++/ffead-cpp/benchmark_config.json

Lines changed: 242 additions & 202 deletions
Large diffs are not rendered by default.

frameworks/C++/ffead-cpp/ffead-cpp-base-debug.dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ RUN mkdir /installs
1313
COPY te-benchmark-um/ /installs/te-benchmark-um/
1414
COPY te-benchmark-um-pq/ /installs/te-benchmark-um-pq/
1515
COPY te-benchmark-um-mgr/ /installs/te-benchmark-um-mgr/
16+
COPY te-benchmark-um-pq-async /installs/te-benchmark-um-pq-async/
1617

1718
WORKDIR ${IROOT}
1819

frameworks/C++/ffead-cpp/ffead-cpp-base.dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ RUN mkdir /installs
1313
COPY te-benchmark-um/ /installs/te-benchmark-um/
1414
COPY te-benchmark-um-pq/ /installs/te-benchmark-um-pq/
1515
COPY te-benchmark-um-mgr/ /installs/te-benchmark-um-mgr/
16+
COPY te-benchmark-um-pq-async /installs/te-benchmark-um-pq-async/
1617

1718
WORKDIR ${IROOT}
1819

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM sumeetchhetri/ffead-cpp-5.0-sql-raw-async-clibpqb-profiled-base:5.2
2+
3+
ENV IROOT=/installs
4+
5+
WORKDIR /
6+
7+
CMD ./run_ffead.sh ffead-cpp-5.0-sql emb postgresql-raw-async memory
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM sumeetchhetri/ffead-cpp-5.0-sql-raw-async-profiled-base:5.2
2+
3+
ENV IROOT=/installs
4+
5+
WORKDIR /
6+
7+
CMD ./run_ffead.sh ffead-cpp-5.0-sql emb postgresql-raw-async memory
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
FROM sumeetchhetri/ffead-cpp-5.0-base:5.2
2+
LABEL maintainer="Sumeet Chhetri"
3+
LABEL version="5.2"
4+
LABEL description="SQL Raw Custom libpq batch patched Base ffead-cpp docker image with commit id - master"
5+
6+
WORKDIR /tmp
7+
RUN mkdir postgresql
8+
9+
COPY postgresql/* /tmp/postgresql/
10+
11+
#POSTGRESQL
12+
WORKDIR /tmp/postgresql/
13+
14+
# prepare PostgreSQL APT repository
15+
RUN apt-get -yqq update && apt-get -yqq install locales gnupg lsb-release
16+
17+
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
18+
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
19+
20+
ENV PG_VERSION 13
21+
RUN locale-gen en_US.UTF-8
22+
ENV LANG en_US.UTF-8
23+
ENV LANGUAGE en_US:en
24+
ENV LC_ALL en_US.UTF-8
25+
ENV DEBIAN_FRONTEND noninteractive
26+
27+
# install postgresql on database machine
28+
RUN apt-get -yqq update && apt-get -yqq install postgresql-13 postgresql-contrib-13 && rm -rf /var/lib/apt/lists/*
29+
30+
# Make sure all the configuration files in main belong to postgres
31+
RUN mv postgresql.conf /etc/postgresql/${PG_VERSION}/main/postgresql.conf
32+
RUN mv pg_hba.conf /etc/postgresql/${PG_VERSION}/main/pg_hba.conf
33+
34+
RUN chown -Rf postgres:postgres /etc/postgresql/${PG_VERSION}/main
35+
36+
RUN mkdir /ssd
37+
RUN cp -R -p /var/lib/postgresql/${PG_VERSION}/main /ssd/postgresql
38+
RUN cp /etc/postgresql/${PG_VERSION}/main/postgresql.conf /ssd/postgresql
39+
RUN mv 60-postgresql-shm.conf /etc/sysctl.d/60-postgresql-shm.conf
40+
41+
RUN chown -Rf postgres:postgres /var/run/postgresql
42+
RUN chmod 2777 /var/run/postgresql
43+
RUN chown postgres:postgres /etc/sysctl.d/60-postgresql-shm.conf
44+
RUN chown postgres:postgres create-postgres*
45+
RUN chown -Rf postgres:postgres /ssd
46+
47+
ENV PGDATA=/ssd/postgresql
48+
49+
USER postgres
50+
51+
# We have to wait for postgres to start before we can use the cli
52+
RUN service postgresql start && \
53+
until psql -c "\q"; do sleep 1; done && \
54+
psql < create-postgres-database.sql && \
55+
psql -a hello_world < create-postgres.sql && \
56+
service postgresql stop
57+
#POSTGRESQL
58+
59+
USER root
60+
61+
#WRK
62+
WORKDIR /tmp/wrk
63+
RUN apt-get -yqq update && apt-get -yqq install libluajit-5.1-dev libssl-dev luajit && rm -rf /var/lib/apt/lists/* && \
64+
curl -sL https://github.com/wg/wrk/archive/4.1.0.tar.gz | tar xz --strip-components=1
65+
ENV LDFLAGS="-O3 -march=native -flto"
66+
ENV CFLAGS="-I /usr/include/luajit-2.1 $LDFLAGS"
67+
RUN make WITH_LUAJIT=/usr WITH_OPENSSL=/usr -j "$(nproc)"
68+
RUN cp wrk /usr/local/bin
69+
70+
ENV name name
71+
ENV server_host server_host
72+
ENV levels levels
73+
ENV duration duration
74+
ENV max_concurrency max_concurrency
75+
ENV max_threads max_threads
76+
ENV pipeline pipeline
77+
ENV accept accept
78+
#WRK
79+
80+
WORKDIR ${IROOT}
81+
82+
COPY sql-async-profiled-install-clang.sh install_ffead-cpp-sql-raw-profiled.sh ${IROOT}/
83+
RUN chmod 755 ${IROOT}/sql-async-profiled-install-clang.sh ${IROOT}/install_ffead-cpp-sql-raw-profiled.sh
84+
85+
RUN ./sql-async-profiled-install-clang.sh batch
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
FROM sumeetchhetri/ffead-cpp-5.0-base:5.2
2+
LABEL maintainer="Sumeet Chhetri"
3+
LABEL version="5.2"
4+
LABEL description="SQL Raw Base ffead-cpp docker image with commit id - master"
5+
6+
WORKDIR /tmp
7+
RUN mkdir postgresql
8+
9+
COPY postgresql/* /tmp/postgresql/
10+
11+
#POSTGRESQL
12+
WORKDIR /tmp/postgresql/
13+
14+
# prepare PostgreSQL APT repository
15+
RUN apt-get -yqq update && apt-get -yqq install locales gnupg lsb-release
16+
17+
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
18+
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list
19+
20+
ENV PG_VERSION 13
21+
RUN locale-gen en_US.UTF-8
22+
ENV LANG en_US.UTF-8
23+
ENV LANGUAGE en_US:en
24+
ENV LC_ALL en_US.UTF-8
25+
ENV DEBIAN_FRONTEND noninteractive
26+
27+
# install postgresql on database machine
28+
RUN apt-get -yqq update && apt-get -yqq install postgresql-13 postgresql-contrib-13 && rm -rf /var/lib/apt/lists/*
29+
30+
# Make sure all the configuration files in main belong to postgres
31+
RUN mv postgresql.conf /etc/postgresql/${PG_VERSION}/main/postgresql.conf
32+
RUN mv pg_hba.conf /etc/postgresql/${PG_VERSION}/main/pg_hba.conf
33+
34+
RUN chown -Rf postgres:postgres /etc/postgresql/${PG_VERSION}/main
35+
36+
RUN mkdir /ssd
37+
RUN cp -R -p /var/lib/postgresql/${PG_VERSION}/main /ssd/postgresql
38+
RUN cp /etc/postgresql/${PG_VERSION}/main/postgresql.conf /ssd/postgresql
39+
RUN mv 60-postgresql-shm.conf /etc/sysctl.d/60-postgresql-shm.conf
40+
41+
RUN chown -Rf postgres:postgres /var/run/postgresql
42+
RUN chmod 2777 /var/run/postgresql
43+
RUN chown postgres:postgres /etc/sysctl.d/60-postgresql-shm.conf
44+
RUN chown postgres:postgres create-postgres*
45+
RUN chown -Rf postgres:postgres /ssd
46+
47+
ENV PGDATA=/ssd/postgresql
48+
49+
USER postgres
50+
51+
# We have to wait for postgres to start before we can use the cli
52+
RUN service postgresql start && \
53+
until psql -c "\q"; do sleep 1; done && \
54+
psql < create-postgres-database.sql && \
55+
psql -a hello_world < create-postgres.sql && \
56+
service postgresql stop
57+
#POSTGRESQL
58+
59+
USER root
60+
61+
#WRK
62+
WORKDIR /tmp/wrk
63+
RUN apt-get -yqq update && apt-get -yqq install libluajit-5.1-dev libssl-dev luajit && rm -rf /var/lib/apt/lists/* && \
64+
curl -sL https://github.com/wg/wrk/archive/4.1.0.tar.gz | tar xz --strip-components=1
65+
ENV LDFLAGS="-O3 -march=native -flto"
66+
ENV CFLAGS="-I /usr/include/luajit-2.1 $LDFLAGS"
67+
RUN make WITH_LUAJIT=/usr WITH_OPENSSL=/usr -j "$(nproc)"
68+
RUN cp wrk /usr/local/bin
69+
70+
ENV name name
71+
ENV server_host server_host
72+
ENV levels levels
73+
ENV duration duration
74+
ENV max_concurrency max_concurrency
75+
ENV max_threads max_threads
76+
ENV pipeline pipeline
77+
ENV accept accept
78+
#WRK
79+
80+
WORKDIR ${IROOT}
81+
82+
COPY sql-async-profiled-install.sh install_ffead-cpp-sql-raw-profiled.sh ${IROOT}/
83+
RUN chmod 755 ${IROOT}/sql-async-profiled-install.sh ${IROOT}/install_ffead-cpp-sql-raw-profiled.sh
84+
85+
RUN ./sql-async-profiled-install.sh

frameworks/C++/ffead-cpp/ffead-cpp-v-base.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN git clone https://github.com/vlang/v && cd v && make && ./v symlink
1818

1919
WORKDIR ${IROOT}/lang-server-backends/v/vweb
2020
#COPY vweb.v ${IROOT}/lang-server-backends/v/vweb/
21-
RUN chmod +x *.sh && ./build.sh && cp vweb $IROOT/
21+
#RUN chmod +x *.sh && ./build.sh && cp vweb $IROOT/
2222

2323
WORKDIR ${IROOT}/lang-server-backends/v/pico.v
2424
#COPY main.v ${IROOT}/lang-server-backends/v/pico.v/

frameworks/C++/ffead-cpp/install_ffead-cpp-backends.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ cd $IROOT
44

55
git clone https://github.com/sumeetchhetri/ffead-cpp
66
cd ffead-cpp
7-
git checkout e6fc4e54a266ee0af1cca7a5e0e6359c06129af7 -b 5.2
7+
git checkout 4e98d8ba1a11505a0b7b450285b20ac0ad7a104f -b 5.0
88
rm -rf .git
99
cd ..
1010
mv ffead-cpp ffead-cpp-src

frameworks/C++/ffead-cpp/install_ffead-cpp-sql-raw-profiled.sh

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
chmod +x $IROOT/ffead-cpp-sql-raw/*.sh
44

5+
SUFFIX=""
6+
if [ "$1" = "async" ]
7+
then
8+
SUFFIX="-async"
9+
fi
10+
511
cp $IROOT/ffead-cpp-sql-raw/server.sh /server_orig.sh
612

713
cd $IROOT/ffead-cpp-sql-raw
@@ -42,16 +48,18 @@ service postgresql start
4248

4349
sed -i 's|EVH_SINGLE=false|EVH_SINGLE=true|g' resources/server.prop
4450
nohup bash -c "./server.sh > ffead.log &"
45-
sleep 5
51+
sleep 10
4652
echo "ffead-cpp with sql-raw support launched"
4753
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' \
48-
-H 'Connection: keep-alive' --latency -d 15 -c 256 --timeout 8 -t 2 "http://localhost:8080/te-benchmark-um-pq/fortunes"
54+
-H 'Connection: keep-alive' --latency -d 5 -c 256 --timeout 8 -t 2 "http://localhost:8080/te-benchmark-um-pq${SUFFIX}/fortunes"
55+
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' \
56+
-H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/te-benchmark-um-pq${SUFFIX}/db"
4957
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' \
50-
-H 'Connection: keep-alive' --latency -d 15 -c 512 --timeout 8 -t 2 "http://localhost:8080/te-benchmark-um-pq/db"
58+
-H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/te-benchmark-um-pq${SUFFIX}/queries?queries=20"
5159
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' \
52-
-H 'Connection: keep-alive' --latency -d 15 -c 512 --timeout 8 -t 2 "http://localhost:8080/te-benchmark-um-pq/queries?queries=20"
60+
-H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/te-benchmark-um-pq${SUFFIX}/updates?queries=20"
5361
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' \
54-
-H 'Connection: keep-alive' --latency -d 15 -c 512 --timeout 8 -t 2 "http://localhost:8080/te-benchmark-um-pq/updates?queries=20"
62+
-H 'Connection: keep-alive' --latency -d 5 -c 512 --timeout 8 -t 2 "http://localhost:8080/te-benchmark-um-pq${SUFFIX}/bupdates?queries=20"
5563
echo "normal shutdown"
5664
rm -f serv.ctrl
5765
pkill ffead-cpp

0 commit comments

Comments
 (0)