Skip to content

Commit 4e98d8b

Browse files
committed
Optimized serialization modules
Fixed issues in libpq async support Added techempower tests for libpq async profiled sceanrios [docker_push][skip_build]
1 parent 2a14c07 commit 4e98d8b

File tree

56 files changed

+1962
-727
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1962
-727
lines changed

.github/workflows/ci-win-cygwin.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
choco install -y cyg-get
2323
cyg-get gcc gcc-g++ autmake patch bzip2 perl tar xz autoconf automake m4 libtool make zlib-devel zlib cmake git libpq-devel curl libcurl-devel libuuid-devel gdb libssl-devel wget dos2unix unzip
2424
- name: Set ENV
25+
env:
26+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
2527
run: |
2628
echo '::set-env name=PATH::C:\tools\cygwin\bin;C:\tools\cygwin\usr\bin'
2729
- name: Install dependencies and ffead-cpp

.github/workflows/ci-win-mingw.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v2
1919
- name: Set ENV
20+
env:
21+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
2022
run: |
2123
echo '::set-env name=PATH::C:\msys64\mingw64\bin;C:\msys64\usr\bin'
2224
- name: Install toolchain

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,13 +427,13 @@ fi
427427

428428
AC_ARG_ENABLE(mod_binserialize,
429429
AS_HELP_STRING([--enable-mod_binserialize],
430-
[enable mod_binserialize, default: yes]),
430+
[enable mod_binserialize, default: no]),
431431
[case "${enableval}" in
432432
yes) mod_binserialize=yes ;;
433433
no) mod_binserialize=no ;;
434434
*) AC_MSG_ERROR([bad value ${enableval} for --enable-mod_binserialize]) ;;
435435
esac],
436-
[mod_binserialize=yes])
436+
[mod_binserialize=no])
437437
AM_CONDITIONAL(MOD_BINSERIALIZE, test "x$mod_binserialize" = "xyes")
438438
if test "x$mod_binserialize" = "xyes"; then
439439
AC_DEFINE(INC_BINSER, [], [enable binary serilaization module])

docker/build-te-images.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,11 @@ docker push sumeetchhetri/ffead-cpp-5.0-sql-raw-profiled-base:5.2
2525
docker rmi -f sumeetchhetri/ffead-cpp-5.0-sql-raw-clibpqb-profiled-base:5.2
2626
docker build -f ffead-cpp-sql-raw-clibpqb-profiled-base.dockerfile -t sumeetchhetri/ffead-cpp-5.0-sql-raw-clibpqb-profiled-base:5.2 .
2727
docker push sumeetchhetri/ffead-cpp-5.0-sql-raw-clibpqb-profiled-base:5.2
28+
29+
docker rmi -f sumeetchhetri/ffead-cpp-5.0-sql-raw-async-profiled-base:5.2
30+
docker build -f ffead-cpp-sql-raw-async-profiled-base.dockerfile -t sumeetchhetri/ffead-cpp-5.0-sql-raw-async-profiled-base:5.2 .
31+
docker push sumeetchhetri/ffead-cpp-5.0-sql-raw-async-profiled-base:5.2
32+
33+
docker rmi -f sumeetchhetri/ffead-cpp-5.0-sql-raw-async-clibpqb-profiled-base:5.2
34+
docker build -f ffead-cpp-sql-raw-async-clibpqb-profiled-base.dockerfile -t sumeetchhetri/ffead-cpp-5.0-sql-raw-async-clibpqb-profiled-base:5.2 .
35+
docker push sumeetchhetri/ffead-cpp-5.0-sql-raw-async-clibpqb-profiled-base:5.2

docker/techempower-config/benchmark_config.json

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"query_url": "/te-benchmark-um/queries?queries=",
99
"fortune_url": "/te-benchmark-um/fortunes",
1010
"update_url": "/te-benchmark-um/updates?queries=",
11-
"cached_query_url": "/te-benchmark-um/cached-worlds?count=",
1211
"port": 8080,
1312
"approach": "Realistic",
1413
"classification": "Fullstack",
@@ -474,7 +473,7 @@
474473
"display_name": "ffead-cpp-mysql",
475474
"notes": "",
476475
"versus": "",
477-
"tags": []
476+
"tags": ["broken"]
478477
},
479478
"postgresql": {
480479
"json_url": "/te-benchmark-um/json",
@@ -483,7 +482,6 @@
483482
"query_url": "/te-benchmark-um/queries?queries=",
484483
"fortune_url": "/te-benchmark-um/fortunes",
485484
"update_url": "/te-benchmark-um/updates?queries=",
486-
"cached_query_url": "/te-benchmark-um/cached-worlds?count=",
487485
"port": 8080,
488486
"approach": "Realistic",
489487
"classification": "Fullstack",
@@ -549,7 +547,7 @@
549547
"db_url": "/te-benchmark-um-pq/db",
550548
"query_url": "/te-benchmark-um-pq/queries?queries=",
551549
"fortune_url": "/te-benchmark-um-pq/fortunes",
552-
"update_url": "/te-benchmark-um-pq/bupdates?queries=",
550+
"update_url": "/te-benchmark-um-pq/updates?queries=",
553551
"port": 8080,
554552
"approach": "Realistic",
555553
"classification": "Fullstack",
@@ -572,7 +570,7 @@
572570
"db_url": "/te-benchmark-um-pq-async/db",
573571
"query_url": "/te-benchmark-um-pq-async/queries?queries=",
574572
"fortune_url": "/te-benchmark-um-pq-async/fortunes",
575-
"update_url": "/te-benchmark-um-pq-async/updates?queries=",
573+
"update_url": "/te-benchmark-um-pq-async/bupdates?queries=",
576574
"cached_query_url": "/te-benchmark-um-pq-async/cached-worlds?count=",
577575
"port": 8080,
578576
"approach": "Realistic",
@@ -590,6 +588,48 @@
590588
"versus": "",
591589
"tags": []
592590
},
591+
"postgresql-raw-async-profiled": {
592+
"db_url": "/te-benchmark-um-pq-async/db",
593+
"query_url": "/te-benchmark-um-pq-async/queries?queries=",
594+
"fortune_url": "/te-benchmark-um-pq-async/fortunes",
595+
"update_url": "/te-benchmark-um-pq-async/bupdates?queries=",
596+
"port": 8080,
597+
"approach": "Realistic",
598+
"classification": "Fullstack",
599+
"database": "postgres",
600+
"framework": "ffead-cpp",
601+
"language": "C++",
602+
"orm": "Raw",
603+
"platform": "None",
604+
"webserver": "ffead-cpp",
605+
"os": "Linux",
606+
"database_os": "Linux",
607+
"display_name": "ffead-cpp-postgresql-raw-async-profiled",
608+
"notes": "memory profiled",
609+
"versus": "",
610+
"tags": []
611+
},
612+
"postgresql-raw-async-clibpqb-profiled": {
613+
"db_url": "/te-benchmark-um-pq-async/db",
614+
"query_url": "/te-benchmark-um-pq-async/queries?queries=",
615+
"fortune_url": "/te-benchmark-um-pq-async/fortunes",
616+
"update_url": "/te-benchmark-um-pq-async/bupdates?queries=",
617+
"port": 8080,
618+
"approach": "Realistic",
619+
"classification": "Fullstack",
620+
"database": "postgres",
621+
"framework": "ffead-cpp",
622+
"language": "C++",
623+
"orm": "Raw",
624+
"platform": "None",
625+
"webserver": "ffead-cpp",
626+
"os": "Linux",
627+
"database_os": "Linux",
628+
"display_name": "ffead-cpp-postgresql-raw-async-clibpqb-profiled",
629+
"notes": "memory libpq batch patch profiled",
630+
"versus": "",
631+
"tags": []
632+
},
593633
"nginx": {
594634
"json_url": "/te-benchmark-um/json",
595635
"plaintext_url": "/plaintext",
@@ -630,4 +670,3 @@
630670
}
631671
}]
632672
}
633-
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

docker/techempower-config/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/

0 commit comments

Comments
 (0)