-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from Informatievlaanderen/feat/graphdb-performance
Feat/graphdb performance
- Loading branch information
Showing
10 changed files
with
416,373 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
# Jmeter performance testing | ||
|
||
- [LDES Server](./server) | ||
- Ensures that the server can handle significant load and its performance doesn't unknowingly degrade. | ||
- Ensures that the server can handle significant load and its performance doesn't unknowingly degrade. | ||
- [LDIO](./ldio) | ||
- Not yet implemented | ||
- Not yet implemented | ||
- [LDES Server + LDIO](./ldio-with-server) | ||
- Not yet implemented | ||
- Not yet implemented | ||
- [Binary Representation (LDIO + LDES Server)](./binary-representations) | ||
- Verifying whether binary data is faster parsed than string data | ||
- Verifying whether binary data is faster parsed than string data | ||
- [Performance of the Repository Materialiser](./graphdb) | ||
- Verifying the performance improvement of using batch-size for storing members in a triples store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Windows | ||
DISPLAY=host.docker.internal:0.0 | ||
X11=./tests/x11 | ||
|
||
# Unix | ||
# DISPLAY=:0 | ||
# X11=/tmp/.X11-unix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM ubuntu:latest | ||
RUN useradd -ms /bin/bash jmeter | ||
RUN apt-get update && apt-get install -y curl && apt-get clean | ||
RUN curl https://dlcdn.apache.org//jmeter/binaries/apache-jmeter-5.6.2.tgz --output apache-jmeter-5.6.2.tgz && tar -xf apache-jmeter-5.6.2.tgz && rm apache-jmeter-5.6.2.tgz && chown jmeter -R /apache-jmeter-5.6.2 && ln -s apache-jmeter-5.6.2 apache-jmeter | ||
RUN apt-get install -y openjdk-19-jre && apt-get clean | ||
RUN curl https://dlcdn.apache.org/jena/binaries/apache-jena-4.10.0.tar.gz --output apache-jena-4.10.0.tar.gz && tar -xf apache-jena-4.10.0.tar.gz && rm apache-jena-4.10.0.tar.gz && chown jmeter -R apache-jena-4.10.0 && ln -s apache-jena-4.10.0 apache-jena | ||
RUN rm apache-jmeter/lib/mongo-java-driver-2* | ||
RUN curl https://repo1.maven.org/maven2/org/mongodb/mongo-java-driver/3.12.14/mongo-java-driver-3.12.14.jar --output apache-jmeter/lib/mongo-java-driver-3.12.14.jar | ||
USER jmeter | ||
WORKDIR /home/jmeter | ||
ENTRYPOINT ["/apache-jmeter/bin/jmeter"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# LDIO Repository Materialiser performance test | ||
|
||
## Test Description | ||
|
||
This test will test the performance of processing models to the RDF4J repository materialiser | ||
|
||
The test will send 10,000 members to ldi-orchestrator, the orchestrator will process and send the members to the RDF4J | ||
repository | ||
|
||
## Test Setup | ||
|
||
> **Note**: if needed, copy the [environment file (.env)](./.env) to a personal file (e.g. `user.env`) and change the | ||
> settings as needed. If you do, you need to add ` --env-file user.env` to each `docker compose` command. | ||
> **_NOTE for Windows users:_** | ||
> | ||
Use [this tutorial](https://medium.com/@potatowagon/how-to-use-gui-apps-in-linux-docker-container-from-windows-host-485d3e1c64a3) | ||
> to run JMeter in the docker-compose file. | ||
> You can use DISPLAY=host.docker.internal:0.0 as environment variable to skip the ipconfig step. | ||
# Steps: | ||
|
||
Prerequisites: | ||
|
||
- Pull the latest version of the ldi orchestrator | ||
|
||
```bash | ||
docker pull ghcr.io/informatievlaanderen/ldi-orchestrator:latest | ||
``` | ||
|
||
1. Prepare directory that will contain the results | ||
```bash | ||
mkdir tests/results | ||
chmod 777 tests/results | ||
rm -rf tests/results/output | ||
rm -rf tests/results/report.jtl | ||
``` | ||
|
||
2. Start test | ||
POST 10k members to LDIO to materialise to the RDF4J repository | ||
```bash | ||
export BATCH_SIZE=500 | ||
docker compose up | ||
``` | ||
|
||
3. End test | ||
```bash | ||
docker compose down | ||
``` | ||
|
||
4. Test results | ||
|
||
To run the different tests, repeat step 1 -> 3 above and insert the results below. | ||
|
||
- Test run: February 23, 2023 | ||
- Docker image | ||
- | ||
|
||
[//]: # (TODO add correct image tag) | ||
|
||
- ldi-orchestrator: ghcr.io/informatievlaanderen/ldi-orchestrator: | ||
|
||
- Resources for both the orchestrator as server: | ||
```yaml | ||
deploy: | ||
resources: | ||
limits: | ||
cpus: '4' | ||
memory: '2GB' | ||
reservations: | ||
cpus: '2' | ||
memory: '1GB' | ||
``` | ||
|
||
# Results | ||
|
||
- `ldes/ldi-orchestrator:2.0.0-SNAPSHOT` \ | ||
Following error was counted 230 times, or for sample it has received: | ||
|
||
```text | ||
Non HTTP response code: java.net.SocketTimeoutException/Non HTTP response message: Read timed out | ||
``` | ||
|
||
- `ghcr.io/informatievlaanderen/ldi-orchestrator:20240301142108` | ||
|
||
Last run on: March 4th 2024 | ||
|
||
10,000 members were sent to the ldio workbench in 10 different threads, which all have a life span of 45 seconds, in the | ||
table below, you can see how members were successfully posted to the workbench for some batch sizes and how many members | ||
were processed per second | ||
|
||
| Batch Size | Members successfully posted | Members processed per second | | ||
|------------|-----------------------------|------------------------------| | ||
| 50 | 216 | 4.69 | | ||
| 100 | 361 | 7.75 | | ||
| 250 | 561 | 10.71 | | ||
| 500 | 788 | 17.58 | | ||
| 1000 | 1210 | 26.78 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
server: | ||
port: 8080 | ||
orchestrator: | ||
pipelines: | ||
- name: gipod | ||
description: "Simple http in, version creation, http out pipeline allowing to pause output." | ||
input: | ||
name: Ldio:HttpIn | ||
adapter: | ||
name: Ldio:RdfAdapter | ||
outputs: | ||
- name: Ldio:RepositoryMaterialiser | ||
config: | ||
sparql-host: http://graphdb:8080/rdf4j-server | ||
repository-id: test | ||
batch-size: 50 | ||
management: | ||
tracing: | ||
sampling: | ||
probability: 1.0 | ||
endpoints: | ||
web: | ||
exposure: | ||
include: "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
version: '3.5' | ||
services: | ||
jmeter: | ||
container_name: graphdb_jmeter | ||
image: jmeter:latest | ||
build: . | ||
environment: | ||
- DISPLAY=${DISPLAY} | ||
volumes: | ||
- ${X11}:/tmp/.X11-unix | ||
- ./tests:/home/jmeter | ||
command: -n -t graphdb-performance-testing.jmx -l results/report.jtl -e -o results/output/ | ||
depends_on: | ||
repository-initializer: | ||
condition: service_completed_successfully | ||
ldio-workbench: | ||
condition: service_healthy | ||
|
||
graphdb: | ||
container_name: rdf4j_server | ||
image: eclipse/rdf4j-workbench:4.3.4 | ||
ports: | ||
- "8080:8080" | ||
|
||
repository-initializer: | ||
image: ubuntu | ||
command: "/bin/sh /initializer/initialize.sh" | ||
container_name: graphdb_repo-initializer | ||
volumes: | ||
- ./repository-initializer:/initializer:ro | ||
depends_on: | ||
graphdb: | ||
condition: service_started | ||
|
||
ldio-workbench: | ||
image: ghcr.io/informatievlaanderen/ldi-orchestrator:20240301142108 | ||
container_name: graphdb_ldio-workbench | ||
environment: | ||
- SPRING_CONFIG_NAME=application | ||
- SPRING_CONFIG_LOCATION=/config/ | ||
volumes: | ||
- ./config/ldio-workbench.config.yml:/config/application.yml:ro | ||
healthcheck: | ||
test: ["CMD", "wget", "-qO-", "http://localhost:8080/actuator/health"] | ||
interval: 10s | ||
timeout: 2s | ||
retries: 10 | ||
ports: | ||
- "8082:8080" | ||
deploy: | ||
resources: | ||
limits: | ||
cpus: '4' | ||
memory: '2GB' | ||
reservations: | ||
cpus: '2' | ||
memory: '1GB' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
apt-get update && apt-get install curl -y && apt-get clean | ||
curl -X PUT http://graphdb:8080/rdf4j-server/repositories/test -H "Content-Type: text/turtle" -d "@/initializer/repo-definition.ttl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. | ||
@prefix config: <tag:rdf4j.org,2023:config/>. | ||
|
||
[] a config:Repository ; | ||
config:rep.id "test" ; | ||
config:rep.impl [ | ||
config:rep.type "openrdf:SailRepository" ; | ||
config:sail.impl [ | ||
config:sail.type "openrdf:MemoryStore" ; | ||
config:mem.persist true ; | ||
] | ||
]. |
Oops, something went wrong.