Whamcloud - gitweb
LU-4931 ladvise: Add willread advice support for ladvise
[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. Advice types are:
19 .RS 1.2i
20 .TP
21 \fBwillread\fR to prefetch data into server cache
22 .RE
23 .TP
24 \fB\-b\fR, \fB\-\-background
25 Enable the advices to be sent and handled asynchronously.
26 .TP
27 \fB\-s\fR, \fB\-\-start\fR=\fISTART_OFFSET\fR
28 File range starts from \fISTART_OFFSET\fR.
29 .TP
30 \fB\-e\fR, \fB\-\-end\fR=\fIEND_OFFSET\fR
31 File range ends at (not including) \fIEND_OFFSET\fR.
32 This option may not be specified at the same time as the -l option.
33 .TP
34 \fB\-l\fR, \fB\-\-length\fR=\fILENGTH\fR
35 File range has length of \fILENGTH\fR. This option may not be specified at the
36 same time as the -e option.
37 .SH NOTE
38 .PP
39 Typically, the "lfs ladvise" forwards the advice to Lustre servers without
40 guaranteeing what and when servers will react to the advice. Actions may or
41 may not triggered when the advices are recieved, depending on the type of the
42 advice as well as the real-time decision of the affected server-side
43 components.
44
45 A typical usage of ladvise is to enable applications and users with external
46 knowledge to intervene in server-side cache management. For example, if a
47 bunch of different clients are doing small random reads of a file, prefetching
48 pages into OSS cache with big linear reads before the random IO is a net
49 benefit. Fetching all that data into each client cache with fadvise() may not
50 be, due to much more data being sent to the client.
51
52 The main difference between Linux fadvise() system call and ladvise is that
53 fadvise() is only a client side mechanism that does not pass the advice to the
54 filesystem, while ladvise can send advices or hints to Lustre server sides.
55
56 .SH EXAMPLES
57 .TP
58 .B $ lfs ladvise -a willread -s 0 -e 1048576000 /mnt/lustre/file1
59 This gives the OST(s) holding the first 1GB of \fB/mnt/lustre/file1\fR a hint
60 that the first 1GB of the file will be read soon.
61 .SH AVAILABILITY
62 The lfs ladvise command is part of the Lustre filesystem.
63 .SH SEE ALSO
64 .BR lfs (1),
65 .BR fadvise (2),
66 .BR llapi_ladvise (3),
67 .BR lustre (7)