You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Agnocast uses POSIX message queues for inter-process notification. The following system parameters may need adjustment.
66
+
67
+
#### `msg_max`: Maximum number of messages per queue (Required)
68
+
65
69
Agnocast requires increasing the system limit for the maximum number of messages in a queue.
66
70
67
71
**Temporary setting (Current session only):**
68
72
69
73
```bash
70
74
sudo sysctl -w fs.mqueue.msg_max=256
71
-
72
75
```
73
76
74
77
**Permanent setting:**
@@ -78,6 +81,55 @@ echo "fs.mqueue.msg_max=256" | sudo tee -a /etc/sysctl.conf
78
81
sudo sysctl -p
79
82
```
80
83
84
+
#### `queues_max`: Maximum number of message queues system-wide (Optional)
85
+
86
+
Agnocast creates a message queue for each subscriber, so the total number of message queues grows with the number of topics and subscribers. The system default for `queues_max` is typically 256, which may not be sufficient for large-scale deployments.
87
+
88
+
You can check the current limit with:
89
+
90
+
```bash
91
+
cat /proc/sys/fs/mqueue/queues_max
92
+
```
93
+
94
+
If you encounter `mq_open failed: No space left on device`, you may need to increase this limit.
95
+
96
+
**Temporary setting (Current session only):**
97
+
98
+
```bash
99
+
sudo sysctl -w fs.mqueue.queues_max=1024
100
+
```
101
+
102
+
**Permanent setting:**
103
+
104
+
```bash
105
+
echo"fs.mqueue.queues_max=1024"| sudo tee -a /etc/sysctl.conf
You can optionally specify the mempool size per process (default: 8GB).
188
+
Note that this parameter is experimental and may be removed or changed in future versions:
189
+
190
+
```bash
191
+
sudo modprobe agnocast mempool_size_gb=16
192
+
```
193
+
194
+
See [shared_memory.md](docs/shared_memory.md) for details on mempool configuration.
195
+
135
196
Run sample app (different window for each script).
136
197
The order does not matter.
137
198
138
199
```bash
139
-
bash scripts/run_listener
140
-
bash scripts/run_talker
200
+
bash scripts/sample_application/run_listener
201
+
bash scripts/sample_application/run_talker
141
202
```
142
203
143
204
Stop applications and unload kernel module.
@@ -268,7 +329,7 @@ sudo lsmod
268
329
You can build, test and generate the coverage report by following:
269
330
270
331
```bash
271
-
bash scripts/test_and_create_report
332
+
bash scripts/test/test_and_create_report
272
333
```
273
334
274
335
### Kernel Module Test
@@ -281,7 +342,7 @@ A custom kernel with the following CONFIG enabled is required to run KUnit Test
281
342
If booting with the custom kernel, the following script can be used to run unit tests on kernel modules and generate coverage reports.
282
343
283
344
```bash
284
-
bash scripts/run_kunit
345
+
bash scripts/test/run_kunit
285
346
```
286
347
287
348
You can also use [pre-commit](#setup-pre-commit)
@@ -341,14 +402,16 @@ Although Agnocast includes cleanup procedures for resources like shared memory a
341
402
rm /dev/shm/agnocast@*
342
403
```
343
404
344
-
Additionally, if you encounter the error `mq_open failed: No space left on device`, it means that the system has reached the maximum number of message queues. In that case, you may need to remove leftover message queues by running:
405
+
Additionally, if you encounter the error `mq_open failed: No space left on device`, it means that the system has reached the maximum number of message queues. In that case, first try removing leftover message queues by running:
345
406
346
407
```bash
347
408
rm /dev/mqueue/agnocast@*
348
409
rm /dev/mqueue/agnocast_bridge_manager_parent@*
349
410
rm /dev/mqueue/agnocast_bridge_manager_daemon@*
350
411
```
351
412
413
+
If the error persists after cleanup, you may need to increase the system-wide limit on the number of message queues. See the [System Configuration](#system-configuration) section above for how to increase `queues_max`.
* fix(heaphook): distribution architecture from all to any (#735 <https://github.com/tier4/agnocast/issues/735>)
9
+
* fix(kmod) [needs minor version update]: Remove AGNOCAST_MEMPOOL_SIZE (#719 <https://github.com/tier4/agnocast/issues/719>)
10
+
* test(heaphook) Add unit tests for zero-sized allocation (#733 <https://github.com/tier4/agnocast/issues/733>)
11
+
* test(heaphook) Add a unit test to check realloc behaves like malloc when called with a null pointer (#734 <https://github.com/tier4/agnocast/issues/734>)
12
+
* test(heaphook): Add unit tests for the fundamental alignment (#726 <https://github.com/tier4/agnocast/issues/726>)
13
+
* fix(heaphook) Fix calloc to return a null pointer when the total size does not fit in size_t (#722 <https://github.com/tier4/agnocast/issues/722>)
14
+
* fix(heaphook) Fix `aligned_alloc` to always return a `MIN_ALIGN`-byte aligned address when the fundamental alignment is requested. (#713 <https://github.com/tier4/agnocast/issues/713>)
15
+
* fix(heaphook) Fix `realloc` to call `malloc` when the pointer is `NULL` (#705 <https://github.com/tier4/agnocast/issues/705>)
16
+
* fix(heaphook): Handle unexpected `realloc` by returning null (#700 <https://github.com/tier4/agnocast/issues/700>)
17
+
* refactor(heaphook) Refactor test code to use `is_shared` function (#699 <https://github.com/tier4/agnocast/issues/699>)
18
+
* feat(heaphook) Support Custom Memory Allocators (#691 <https://github.com/tier4/agnocast/issues/691>)
19
+
* feat(heaphook) Define `AgnocastSharedMemoryAllocator` trait to support custom memory allocators (#686 <https://github.com/tier4/agnocast/issues/686>)
20
+
* fix: error when upgrading heaphook (#685 <https://github.com/tier4/agnocast/issues/685>)
21
+
22
+
-- Takahiro Ishikawa-Aso <sykwer@gmail.com> Thu, 19 Feb 2026 2:18:00 +0900
Description: A heap runtime replacement for Agnocast.
16
16
To achieve true zero-copy communication with Agnocast, message objects must be placed in shared memory. Therefore, all heap allocation and deallocation operations are intercepted and customized using LD_PRELOAD hooks.
0 commit comments