Whamcloud - gitweb
LU-7117 osp: set ptlrpc_request::rq_allow_replay properly
[fs/lustre-release.git] / lustre / doc / lfs-ladvise.1
1 .TH LFS-LADVISE 1 2015-11-30 "Lustre" "Lustre Utilities"
2 .SH NAME
3 lfs ladvise \- give file access advices or hints to server.
4 .SH SYNOPSIS
5 .br
6 .B lfs ladvise [--advice|-a ADVICE ] [--background|-b]
7         \fB[--start|-s START[kMGT]]
8         \fB{[--end|-e END[kMGT]] | [--length|-l LENGTH[kMGT]]}
9         \fB<FILE> ...\fR
10 .br
11 .SH DESCRIPTION
12 Give file access advices or hints to Lustre server side, usually OSS. This lfs
13 utility is simlar to Linux fadvise() system call, except it can forward the
14 advices from Lustre clients to servers.
15 .SH OPTIONS
16 .TP
17 \fB\-a\fR, \fB\-\-advice\fR=\fIADVICE\fR
18 Give advice or hint of type \fIADVICE\fR.
19 .TP
20 \fB\-b\fR, \fB\-\-background
21 Enable the advices to be sent and handled asynchronously.
22 .TP
23 \fB\-s\fR, \fB\-\-start\fR=\fISTART_OFFSET\fR
24 File range starts from \fISTART_OFFSET\fR.
25 .TP
26 \fB\-e\fR, \fB\-\-end\fR=\fIEND_OFFSET\fR
27 File range ends at (not including) \fIEND_OFFSET\fR.
28 This option may not be specified at the same time as the -l option.
29 .TP
30 \fB\-l\fR, \fB\-\-length\fR=\fILENGTH\fR
31 File range has length of \fILENGTH\fR. This option may not be specified at the
32 same time as the -e option.
33 .SH NOTE
34 .PP
35 Typically, the "lfs ladvise" forwards the advice to Lustre servers without
36 guaranteeing what and when servers will react to the advice. Actions may or
37 may not triggered when the advices are recieved, depending on the type of the
38 advice as well as the real-time decision of the affected server-side
39 components.
40
41 A typical usage of ladvise is to enable applications and users with external
42 knowledge to intervene in server-side cache management. For example, if a
43 bunch of different clients are doing small random reads of a file, prefetching
44 pages into OSS cache with big linear reads before the random IO is a net
45 benefit. Fetching all that data into each client cache with fadvise() may not
46 be, due to much more data being sent to the client.
47
48 The main difference between Linux fadvise() system call and ladvise is that
49 fadvise() is only a client side mechanism that does not pass the advice to the
50 filesystem, while ladvise can send advices or hints to Lustre server sides.
51
52 .SH AVAILABILITY
53 The lfs ladvise command is part of the Lustre filesystem.
54 .SH SEE ALSO
55 .BR lfs (1),
56 .BR fadvise (2),
57 .BR llapi_ladvise (3),
58 .BR lustre (7)