Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exchange network backend from Gsocket to libfabric #124

Open
wants to merge 61 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
7884e48
Add network port to jconfiguration
JBenda Aug 4, 2021
faced31
Replaced magic port numbers with configuration
JBenda Aug 4, 2021
0d12075
Add port configuration to config-tool
JBenda Aug 4, 2021
0527b66
Adapt documentation for new feature
JBenda Aug 4, 2021
2516f77
Add libfabirc example
JBenda Jun 29, 2021
340cce7
Fix memory leaks and add closing server
JBenda Jun 29, 2021
a619897
First docu of network
JBenda Jul 1, 2021
4793355
Changed srecv to recv
JBenda Jul 1, 2021
5d50465
Place jnetwork in correct location & edit build file
JBenda Jul 1, 2021
ed03ab4
introduce rma_mem_id
JBenda Jul 2, 2021
d4f0673
Adapt jmessage to jnetwork
JBenda Jul 2, 2021
d04b2b0
Introduce new interface in loop and jobject
JBenda Jul 7, 2021
1968022
It's compiled (what is already coded)
JBenda Jul 7, 2021
8666f0f
WIP
JBenda Aug 4, 2021
859f91e
Working hand shake and no connection stall
JBenda Aug 4, 2021
578fc2b
Transfare first header correct
JBenda Aug 4, 2021
20a7e00
Remove debug code
JBenda Aug 4, 2021
16b693b
Hello World works
JBenda Aug 5, 2021
279418e
Remove prints and dummy vars
JBenda Aug 5, 2021
f31b35e
Remove hints memory leak
JBenda Aug 5, 2021
9cd6dd0
Free message buffer memory after finish tranmition
JBenda Aug 13, 2021
71d6438
Enable injecting of small messages
JBenda Aug 15, 2021
304b596
Fix new header ack communication for distrubted-objectk
JBenda Aug 15, 2021
48f590d
Disable test
JBenda Aug 15, 2021
dff90ef
Use JCredentials to fetch user id for port
JBenda Aug 6, 2021
dfb3ca2
Read server data from config
JBenda Aug 15, 2021
f0db28d
Remove Debug message
JBenda Aug 24, 2021
9eb831f
Editing to work via tcp
JBenda Aug 24, 2021
039d313
Working tcp `hello_world`
JBenda Aug 24, 2021
13c6117
More tcp fixes
JBenda Aug 24, 2021
f63e567
Remove debug messages
JBenda Aug 24, 2021
de255ca
Clean up
JBenda Aug 24, 2021
0003fd8
Fix rma addresses for non virt address support?
JBenda Aug 24, 2021
90c4f43
Remove rma read limit
JBenda Sep 15, 2021
e99a8fd
Add trace functions for network code
JBenda Oct 11, 2021
65a31eb
Enchant OBJECT_WRITE
JBenda Oct 13, 2021
108f2a2
Reduce serialisation for READ
JBenda Oct 13, 2021
918b94b
Enchantet writing/reading of small objects
JBenda Oct 18, 2021
73f0c85
Implement new read logic in distributed object
JBenda Oct 20, 2021
561e313
Check if list exist before query size
JBenda Oct 20, 2021
c3a608c
Add large object benchmarks
JBenda Oct 20, 2021
e4e3857
Update Docu for network code
JBenda Oct 22, 2021
639b53c
Rework todos in network code
JBenda Oct 22, 2021
9e570fb
Run autoformat
JBenda Oct 22, 2021
e0d6927
Add RDMA dependency
JBenda Oct 23, 2021
925207f
clean up compiler warnings
JBenda Oct 23, 2021
0515521
Add libfabric to system dependencies
JBenda Oct 23, 2021
833fa3d
Add libfabric-dev also for test build
JBenda Oct 24, 2021
2ae6e61
Fix missing initelization
JBenda Oct 27, 2021
f6ea573
Moved message injection size to config
JBenda Oct 27, 2021
d51d50e
Print julea server log on test fail
JBenda Oct 27, 2021
93c0a95
Keep fabric hints around until finalisation
JBenda Oct 27, 2021
99d136c
Fix test workflow results
JBenda Oct 28, 2021
a15b56b
Run autoformatter
JBenda Oct 28, 2021
919ff5c
Rebase to master, set libfabric version to 1.6
JBenda Oct 31, 2021
770927e
Fix ci
JBenda Oct 31, 2021
cb7d9ad
Autoformat + disable system checks for Ubuntu20.04
JBenda Oct 31, 2021
830a888
Fix spelling mistake
JBenda Oct 31, 2021
82ea7f3
Set Libfabric version back to 11
JBenda Nov 2, 2021
9c036dd
Removed wrong flag from julea-config example
JBenda Nov 2, 2021
4d5e8bb
Merge branch 'master' into feature/add_libfabirc
JBenda Jan 27, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
sudo apt --yes --purge autoremove
sudo aa-remove-unknown
sudo apt update || true
sudo apt --yes --no-install-recommends install ninja-build pkgconf libglib2.0-dev libbson-dev liblmdb-dev libsqlite3-dev libleveldb-dev libmongoc-dev libmariadb-dev librocksdb-dev libfuse3-dev libopen-trace-format-dev librados-dev
sudo apt --yes --no-install-recommends install ninja-build pkgconf libglib2.0-dev libbson-dev liblmdb-dev libsqlite3-dev libleveldb-dev libmongoc-dev libmariadb-dev librocksdb-dev libfuse3-dev libopen-trace-format-dev librados-dev libfabric-dev
sudo apt --yes --no-install-recommends install python3 python3-pip python3-setuptools python3-wheel
sudo pip3 install meson
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add libfabric to dependencies

- name: Cache dependencies
Expand Down Expand Up @@ -198,6 +198,10 @@ jobs:
- os:
dist: ubuntu-18.04
dependencies: system
# libfaibrc don't work on Ubuntu 20.04
- os:
dist: ubuntu-20.04
dependencies: system
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disable system test because libfabric won't start properly

steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -211,7 +215,7 @@ jobs:
sudo apt --yes --purge autoremove
sudo aa-remove-unknown
sudo apt update || true
sudo apt --yes --no-install-recommends install ninja-build pkgconf libglib2.0-dev libbson-dev liblmdb-dev libsqlite3-dev libleveldb-dev libmongoc-dev libmariadb-dev librocksdb-dev libfuse3-dev libopen-trace-format-dev librados-dev
sudo apt --yes --no-install-recommends install ninja-build pkgconf libglib2.0-dev libbson-dev liblmdb-dev libsqlite3-dev libleveldb-dev libmongoc-dev libmariadb-dev librocksdb-dev libfuse3-dev libopen-trace-format-dev librados-dev libfabric-dev
sudo apt --yes --no-install-recommends install python3 python3-pip python3-setuptools python3-wheel
sudo pip3 install meson
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add libfabric to dependencies

- name: Cache dependencies
Expand Down Expand Up @@ -294,9 +298,9 @@ jobs:
run: |
. scripts/environment.sh
./scripts/setup.sh start
./scripts/test.sh
./scripts/test.sh || (journalctl GLIB_DOMAIN=JULEA && $(exit 1))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Print journal from SERVER if test fails

sleep 10
./scripts/test.sh
./scripts/test.sh || (journalctl GLIB_DOMAIN=JULEA && $(exit 1))
./scripts/setup.sh stop
- name: HDF5 Tests
if: matrix.julea.db != 'memory'
Expand Down
2 changes: 1 addition & 1 deletion backend/db/sql-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ _backend_schema_get(gpointer backend_data, gpointer _batch, gchar const* name, b
return TRUE;

_error:
if (G_UNLIKELY(!j_sql_reset(thread_variables->sql_backend, prepared->stmt, NULL)))
if (G_UNLIKELY(!thread_variables || !prepared || !j_sql_reset(thread_variables->sql_backend, prepared->stmt, NULL)))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thread_variables and/or prepared may be NULL if initialization failed. Therefore, we must check it in error handling

{
goto _error2;
}
Expand Down
39 changes: 35 additions & 4 deletions benchmark/object/distributed-object.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@

#include "benchmark.h"

#define SMALL_OBJECT_SIZE 4 * 1024
#define LARGE_OBJECT_SIZE 256 * 1024

static void
_benchmark_distributed_object_create(BenchmarkRun* run, gboolean use_batch)
{
Expand Down Expand Up @@ -302,13 +305,25 @@ _benchmark_distributed_object_read(BenchmarkRun* run, gboolean use_batch, guint
static void
benchmark_distributed_object_read(BenchmarkRun* run)
{
_benchmark_distributed_object_read(run, FALSE, 4 * 1024);
_benchmark_distributed_object_read(run, FALSE, SMALL_OBJECT_SIZE);
}

static void
benchmark_distributed_object_read_large(BenchmarkRun* run)
{
_benchmark_distributed_object_read(run, FALSE, LARGE_OBJECT_SIZE);
}

static void
benchmark_distributed_object_read_batch(BenchmarkRun* run)
{
_benchmark_distributed_object_read(run, TRUE, 4 * 1024);
_benchmark_distributed_object_read(run, TRUE, SMALL_OBJECT_SIZE);
}

static void
benchmark_distributed_object_read_large_batch(BenchmarkRun* run)
{
_benchmark_distributed_object_read(run, TRUE, LARGE_OBJECT_SIZE);
}

static void
Expand Down Expand Up @@ -372,13 +387,25 @@ _benchmark_distributed_object_write(BenchmarkRun* run, gboolean use_batch, guint
static void
benchmark_distributed_object_write(BenchmarkRun* run)
{
_benchmark_distributed_object_write(run, FALSE, 4 * 1024);
_benchmark_distributed_object_write(run, FALSE, SMALL_OBJECT_SIZE);
}

static void
benchmark_distributed_object_write_large(BenchmarkRun* run)
{
_benchmark_distributed_object_write(run, FALSE, LARGE_OBJECT_SIZE);
}

static void
benchmark_distributed_object_write_batch(BenchmarkRun* run)
{
_benchmark_distributed_object_write(run, TRUE, 4 * 1024);
_benchmark_distributed_object_write(run, TRUE, SMALL_OBJECT_SIZE);
}

static void
benchmark_distributed_object_write_large_batch(BenchmarkRun* run)
{
_benchmark_distributed_object_write(run, TRUE, LARGE_OBJECT_SIZE);
}

static void
Expand Down Expand Up @@ -451,9 +478,13 @@ benchmark_distributed_object(void)
j_benchmark_add("/object/distributed-object/status-batch", benchmark_distributed_object_status_batch);
/// \todo get
j_benchmark_add("/object/distributed-object/read", benchmark_distributed_object_read);
j_benchmark_add("/object/distributed-object/read-large", benchmark_distributed_object_read_large);
j_benchmark_add("/object/distributed-object/read-batch", benchmark_distributed_object_read_batch);
j_benchmark_add("/object/distributed-object/read-large-batch", benchmark_distributed_object_read_large_batch);
j_benchmark_add("/object/distributed-object/write", benchmark_distributed_object_write);
j_benchmark_add("/object/distributed-object/write-large", benchmark_distributed_object_write_large);
j_benchmark_add("/object/distributed-object/write-batch", benchmark_distributed_object_write_batch);
j_benchmark_add("/object/distributed-object/write-large-batch", benchmark_distributed_object_write_large_batch);
j_benchmark_add("/object/distributed-object/unordered-create-delete", benchmark_distributed_object_unordered_create_delete);
j_benchmark_add("/object/distributed-object/unordered-create-delete-batch", benchmark_distributed_object_unordered_create_delete_batch);
}
38 changes: 34 additions & 4 deletions benchmark/object/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@

#include "benchmark.h"

#define SMALL_OBJECT_SIZE 4 * 1024
#define LARGE_OBJECT_SIZE 256 * 1024

static void
_benchmark_object_create(BenchmarkRun* run, gboolean use_batch)
{
Expand Down Expand Up @@ -294,13 +297,25 @@ _benchmark_object_read(BenchmarkRun* run, gboolean use_batch, guint block_size)
static void
benchmark_object_read(BenchmarkRun* run)
{
_benchmark_object_read(run, FALSE, 4 * 1024);
_benchmark_object_read(run, FALSE, SMALL_OBJECT_SIZE);
}

static void
benchmark_object_read_large(BenchmarkRun* run)
{
_benchmark_object_read(run, FALSE, LARGE_OBJECT_SIZE);
}

static void
benchmark_object_read_batch(BenchmarkRun* run)
{
_benchmark_object_read(run, TRUE, 4 * 1024);
_benchmark_object_read(run, TRUE, SMALL_OBJECT_SIZE);
}

static void
benchmark_object_read_large_batch(BenchmarkRun* run)
{
_benchmark_object_read(run, TRUE, LARGE_OBJECT_SIZE);
}

static void
Expand Down Expand Up @@ -362,13 +377,24 @@ _benchmark_object_write(BenchmarkRun* run, gboolean use_batch, guint block_size)
static void
benchmark_object_write(BenchmarkRun* run)
{
_benchmark_object_write(run, FALSE, 4 * 1024);
_benchmark_object_write(run, FALSE, SMALL_OBJECT_SIZE);
}

static void
benchmark_object_write_large(BenchmarkRun* run)
{
_benchmark_object_write(run, FALSE, LARGE_OBJECT_SIZE);
}

static void
benchmark_object_write_batch(BenchmarkRun* run)
{
_benchmark_object_write(run, TRUE, 4 * 1024);
_benchmark_object_write(run, TRUE, SMALL_OBJECT_SIZE);
}
static void
benchmark_object_write_large_batch(BenchmarkRun* run)
{
_benchmark_object_write(run, TRUE, LARGE_OBJECT_SIZE);
}

static void
Expand Down Expand Up @@ -439,9 +465,13 @@ benchmark_object(void)
j_benchmark_add("/object/object/status-batch", benchmark_object_status_batch);
/// \todo get
j_benchmark_add("/object/object/read", benchmark_object_read);
j_benchmark_add("/object/object/read-large", benchmark_object_read_large);
j_benchmark_add("/object/object/read-batch", benchmark_object_read_batch);
j_benchmark_add("/object/object/read-large-batch", benchmark_object_read_large_batch);
j_benchmark_add("/object/object/write", benchmark_object_write);
j_benchmark_add("/object/object/write-large", benchmark_object_write_large);
j_benchmark_add("/object/object/write-batch", benchmark_object_write_batch);
j_benchmark_add("/object/object/write-large-batch", benchmark_object_write_large_batch);
j_benchmark_add("/object/object/unordered-create-delete", benchmark_object_unordered_create_delete);
j_benchmark_add("/object/object/unordered-create-delete-batch", benchmark_object_unordered_create_delete_batch);
}
8 changes: 4 additions & 4 deletions example/hello-world.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ main(int argc, char** argv)
g_autoptr(JKV) kv = NULL;
g_autoptr(JObject) object = NULL;

gchar const* hello_world = "Hello World!";
gchar const* hello_world = g_strdup("Hello World!");
guint64 nbytes;

(void)argc;
Expand Down Expand Up @@ -74,14 +74,14 @@ main(int argc, char** argv)

if (j_batch_execute(batch))
{
printf("Object contains: %s (%" G_GUINT64_FORMAT " bytes)\n", buffer, nbytes);
g_message("Object contains: %s (%" G_GUINT64_FORMAT " bytes)\n", buffer, nbytes);
}

j_kv_get(kv, &value, &length, batch);

if (j_batch_execute(batch))
{
printf("KV contains: %s (%" G_GUINT32_FORMAT " bytes)\n", (gchar*)value, length);
g_message("KV contains: %s (%" G_GUINT32_FORMAT " bytes)\n", (gchar*)value, length);
}

selector = j_db_selector_new(schema, J_DB_SELECTOR_MODE_AND, NULL);
Expand All @@ -93,7 +93,7 @@ main(int argc, char** argv)
JDBType type;

j_db_iterator_get_field(iterator, "hello", &type, (gpointer*)&db_field, &db_length, NULL);
printf("DB contains: %s (%" G_GUINT64_FORMAT " bytes)\n", db_field, db_length);
g_message("DB contains: %s (%" G_GUINT64_FORMAT " bytes)\n", db_field, db_length);
}
}

Expand Down
Loading