fsmonitor on linux is triggered due to unison changes its fingerprint cache

Ulrich Gemkow <[email protected]> Fri, 19 Sep 2025 21:22:50 +0200
Newsgroups gmane.network.unison.general
Organization University of Stuttgart (Germany), IKR
Message-ID <[email protected]>
Hello,

We use unison (text UI) to synchronize the homedirs of our users
with our file server. We use "-repeat watch" to only start a
synchronize run when something is changed in the replicas.

In this mode the fsmonitor is triggered about every second by a
change in the homedir. Caused by this unison is triggered too.
This happens even when the user has nothing changed in the homedir
(on both sides).

Some digging into this using an inotify watch tool on the file
server shows that the trigger is caused by unison itself, which
accesses its fingerprint cache (File fp*) about every second.

The inotify watch tool shows this sequence about every second:

# ~/.unison/homesync/ OPEN fpd51d53afbd71ea49fcec7a981a36e25f
# ~/.unison/homesync/ ACCESS fpd51d53afbd71ea49fcec7a981a36e25f
# ~/.unison/homesync/ CLOSE_NOWRITE,CLOSE fpd51d53afbd71ea49fcec7a981a36e25f
# ~/.unison/homesync/ OPEN fpd51d53afbd71ea49fcec7a981a36e25f
# ~/.unison/homesync/ MODIFY fpd51d53afbd71ea49fcec7a981a36e25f
# ~/.unison/homesync/ CLOSE_WRITE,CLOSE fpd51d53afbd71ea49fcec7a981a36e25f

Please note that the .unison dir is excluded from syncing (but this
is not known by the fsmonitor). So nothing is synced, unison on the
client side says

# Looking for changes
#   Waiting for changes from server
# Reconciling changes
# Nothing to do: replicas have not changed since last sync.

which is correct :-)

I would expect that the fsmonitor is not triggered when there are
no changes in the replicas.

This is not a big deal but prevents our notebooks from going in low
power mode. A very rough measurement has shown that this is
significant on battery life time.

We use unison 2.53.7 on Linux (Debian 13) using the downloadable
package from github for ubuntu. We use ssh as connection method,
unison is compiled with ocaml 4.14.2

Do other users see the same? Is there an easy solution for this?
I do not understand why unison touches its fingerprint cache when
nothing changes.

And - thanks for the great work on unison, we use it regulary
and rely on it!

Best regards

Ulrich

-- 
Ulrich Gemkow
University of Stuttgart
Institute of Communication Networks and Computer Engineering (IKR)