-
Notifications
You must be signed in to change notification settings - Fork 20
Description
We are using DataLink protocol to send data from Earthworm memory ring via ew2ringserver to the ringserver (v2015.182). According to the documentation, ringserver "maintains a stateful ring buffer, memory mapping the buffer by default, which allows the server to be stopped and re-started without any data loss to clients. When ringserver receives a TERM or INT signal (i.e. Control-C) it will shut down cleanly, saving it's current ring buffer and file scanning status."
If I understand it correctly, seedlink client requests are thus (ideally) fulfilled from RAM by default (for better performance) and even without any special implementation the Linux kernel will always check if the requested blocks are in RAM cache without having to read from disk.
As expected, the ringserver appears to constantly sync (save) the new data from RAM to its RingDirectory in the background, so when the ringserver process is properly terminated (including VM reboots where systemd should prefer sending SIGTERM), ringserver flushes/syncs any unsaved memory cache to disk and reread it on start-up.
However, if you happened to increase the RingSize in ringserver.d and then restart to apply, all the data existing in RingDirectory and memory cache will be discarded/ignored (not used), based on the "Earliest Packet" timestamps returned by dalitool. The actual data is still in packetbuf but presumably cannot be accessed (and served to the clients) via seedlink anymore, and over time it will just get overwritten with newer data. Does it make sense to have an option for the ringserver to be able to read / merge data from its pre-existing RingDirectory on start-up with a newly changed (larger or smaller) value of RingSize, and if so, is it technically feasible to implement? Thank you for any insights!