l'opzione "sync" in NFS


significato dell'opzione "sync/async" nel NetworkFileSystem"

dal: man nfs


The sync mount option
The NFS client treats the sync mount option differently than some other file sys‐
tems (refer to mount(8) for a description of the generic sync and async mount
options). If neither sync nor async is specified (or if the async option is speci‐
fied), the NFS client delays sending application writes to the server until any of
these events occur:

1) Memory pressure forces reclamation of system memory resources.
2) An application flushes file data explicitly with sync(2), msync(2), or fsync(3)
3) An application closes a file with close(2)
4) The file is locked/unlocked via fcntl(2)

In other words, under normal circumstances, data written by an application may not
immediately appear on the server that hosts the file.
If the sync option is specified on a mount point, any system call that writes data
to files on that mount point causes that data to be flushed to the server before
the system call returns control to user space. This provides greater data cache
coherence among clients, but at a significant performance cost.


traduzione


L'opzione di mount sync
il client di NFS tratta l'opzione di mount diversamente dagli altri filesystem
fare riferimento a mount(8) per una descrizione delle generiche opzioni sync e async
se non sono specificate ne' sync ne' async (o se viene specificata l'opzione async)
il client NFS ritarda le scritture delle applicazioni sul server fino a che un evento
tra questi accade:

1) l'attivita della memoria forza la richiesta di risorse di memoria di sistema
2) un'applicazione libera i dati dei file esplicitamente con sync(2), msync(2) o fsync(3)
3) un'applicazione chiude un file con close
4) il file e' bloccato/sbloccato attraverso fcntl

In altre parole, in circostanze normali, i dati scritti da un'applicazione possono non
apparire immediatamente sul server che li ospita.
Se viene specificata l'opzione sync in un mount, qualsiasi chiamata di sistema che scrive dati
sui file di quel punto di mount causa lo scaricamento dei dati sul server prima
che la chiamata di sistema ritorni il controllo all'userspace. Questo fornisce maggiore coerenza
dei dati della cache tra i client, ma ad un costo significante di performance.



note:

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/nfs-serverconfig.html#nfs-serverconfig-exports


Articolo tratto da: #341724 Linux - http://sacarde.altervista.org/
URL di riferimento: http://sacarde.altervista.org/index.php?mod=read&id=1467711425