xref: /dflybsd-src/share/man/man4/syncer.4 (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
1*86d7f5d3SJohn Marino.\" Copyright (c) 2000 Sheldon Hearn <sheldonh@FreeBSD.org>
2*86d7f5d3SJohn Marino.\" All rights reserved.
3*86d7f5d3SJohn Marino.\"
4*86d7f5d3SJohn Marino.\" Redistribution and use in source and binary forms, with or without
5*86d7f5d3SJohn Marino.\" modification, are permitted provided that the following conditions
6*86d7f5d3SJohn Marino.\" are met:
7*86d7f5d3SJohn Marino.\" 1. Redistributions of source code must retain the above copyright
8*86d7f5d3SJohn Marino.\"    notice, this list of conditions and the following disclaimer.
9*86d7f5d3SJohn Marino.\" 2. Redistributions in binary form must reproduce the above copyright
10*86d7f5d3SJohn Marino.\"    notice, this list of conditions and the following disclaimer in the
11*86d7f5d3SJohn Marino.\"    documentation and/or other materials provided with the distribution.
12*86d7f5d3SJohn Marino.\"
13*86d7f5d3SJohn Marino.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
14*86d7f5d3SJohn Marino.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15*86d7f5d3SJohn Marino.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16*86d7f5d3SJohn Marino.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
17*86d7f5d3SJohn Marino.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18*86d7f5d3SJohn Marino.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19*86d7f5d3SJohn Marino.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20*86d7f5d3SJohn Marino.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21*86d7f5d3SJohn Marino.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22*86d7f5d3SJohn Marino.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23*86d7f5d3SJohn Marino.\" SUCH DAMAGE.
24*86d7f5d3SJohn Marino.\"
25*86d7f5d3SJohn Marino.\" $FreeBSD: src/share/man/man4/syncer.4,v 1.3.2.5 2001/07/21 09:16:47 schweikh Exp $
26*86d7f5d3SJohn Marino.\" $DragonFly: src/share/man/man4/syncer.4,v 1.2 2003/06/17 04:36:59 dillon Exp $
27*86d7f5d3SJohn Marino.\"
28*86d7f5d3SJohn Marino.Dd July 14, 2000
29*86d7f5d3SJohn Marino.Dt SYNCER 4
30*86d7f5d3SJohn Marino.Os
31*86d7f5d3SJohn Marino.Sh NAME
32*86d7f5d3SJohn Marino.Nm syncer
33*86d7f5d3SJohn Marino.Nd filesystem synchronizer kernel process
34*86d7f5d3SJohn Marino.Sh SYNOPSIS
35*86d7f5d3SJohn Marino.Nm
36*86d7f5d3SJohn Marino.Sh DESCRIPTION
37*86d7f5d3SJohn MarinoThe
38*86d7f5d3SJohn Marino.Nm
39*86d7f5d3SJohn Marinokernel process helps protect the integrity of disk volumes
40*86d7f5d3SJohn Marinoby flushing volatile cached filesystem data to disk.
41*86d7f5d3SJohn Marino.Pp
42*86d7f5d3SJohn MarinoThe kernel places all
43*86d7f5d3SJohn Marino.Xr vnode 9 Ns 's
44*86d7f5d3SJohn Marinoin a number of queues.
45*86d7f5d3SJohn MarinoThe
46*86d7f5d3SJohn Marino.Nm
47*86d7f5d3SJohn Marinoprocess works through the queues
48*86d7f5d3SJohn Marinoin a round-robin fashion,
49*86d7f5d3SJohn Marinousually processing one queue per second.
50*86d7f5d3SJohn MarinoFor each
51*86d7f5d3SJohn Marino.Xr vnode 9
52*86d7f5d3SJohn Marinoon that queue,
53*86d7f5d3SJohn Marinothe
54*86d7f5d3SJohn Marino.Nm
55*86d7f5d3SJohn Marinoprocess forces a write out to disk of its dirty buffers.
56*86d7f5d3SJohn Marino.Pp
57*86d7f5d3SJohn MarinoThe usual delay between the time buffers are dirtied
58*86d7f5d3SJohn Marinoand the time they are synced
59*86d7f5d3SJohn Marinois controlled by the following
60*86d7f5d3SJohn Marino.Xr sysctl 8
61*86d7f5d3SJohn Marinotunable variables:
62*86d7f5d3SJohn Marino.Bl -column "filedelayXXXX" "DefaultXX" "DescriptionXX"
63*86d7f5d3SJohn Marino.It Em Variable Ta Em Default Ta Em Description
64*86d7f5d3SJohn Marino.It Va kern.filedelay Ta 30 Ta "time to delay syncing files"
65*86d7f5d3SJohn Marino.It Va kern.dirdelay Ta 29 Ta "time to delay syncing directories"
66*86d7f5d3SJohn Marino.It Va kern.metadelay Ta 28 Ta "time to delay syncing metadata"
67*86d7f5d3SJohn Marino.El
68*86d7f5d3SJohn Marino.Sh SEE ALSO
69*86d7f5d3SJohn Marino.Xr sync 2 ,
70*86d7f5d3SJohn Marino.Xr fsck 8 ,
71*86d7f5d3SJohn Marino.Xr sync 8 ,
72*86d7f5d3SJohn Marino.Xr sysctl 8
73*86d7f5d3SJohn Marino.Sh HISTORY
74*86d7f5d3SJohn MarinoThe
75*86d7f5d3SJohn Marino.Nm
76*86d7f5d3SJohn Marinoprocess is a descendant of the
77*86d7f5d3SJohn Marino.Sq update
78*86d7f5d3SJohn Marinocommand, which appeared in
79*86d7f5d3SJohn Marino.At v6 ,
80*86d7f5d3SJohn Marinoand was usually started by
81*86d7f5d3SJohn Marino.Pa /etc/rc
82*86d7f5d3SJohn Marinowhen the system went multi-user.
83*86d7f5d3SJohn MarinoA kernel initiated
84*86d7f5d3SJohn Marino.Sq update
85*86d7f5d3SJohn Marinoprocess first appeared in
86*86d7f5d3SJohn Marino.Fx 2.0 .
87*86d7f5d3SJohn Marino.Sh BUGS
88*86d7f5d3SJohn MarinoIt is possible on some systems that a
89*86d7f5d3SJohn Marino.Xr sync 2
90*86d7f5d3SJohn Marinooccurring simultaneously with a crash may cause
91*86d7f5d3SJohn Marinofile system damage.  See
92*86d7f5d3SJohn Marino.Xr fsck 8 .
93