1 <?xml version='1.0' encoding='UTF-8'?>
2 <chapter xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en-US" xml:id="settinguplustresystem">
3 <title xml:id="settinguplustresystem.title">Determining Hardware Configuration Requirements and
4 Formatting Options</title>
5 <para>This chapter describes hardware configuration requirements for a Lustre file system
10 <xref linkend="dbdoclet.50438256_49017"/>
15 <xref linkend="dbdoclet.50438256_31079"/>
20 <xref linkend="dbdoclet.50438256_84701"/>
25 <xref linkend="dbdoclet.50438256_26456"/>
30 <xref linkend="dbdoclet.50438256_78272"/>
34 <section xml:id="dbdoclet.50438256_49017">
35 <title><indexterm><primary>setup</primary></indexterm>
36 <indexterm><primary>setup</primary><secondary>hardware</secondary></indexterm>
37 <indexterm><primary>design</primary><see>setup</see></indexterm>
38 Hardware Considerations</title>
39 <para>A Lustre file system can utilize any kind of block storage device such as single disks,
40 software RAID, hardware RAID, or a logical volume manager. In contrast to some networked file
41 systems, the block devices are only attached to the MDS and OSS nodes in a Lustre file system
42 and are not accessed by the clients directly.</para>
43 <para>Since the block devices are accessed by only one or two server nodes, a storage area network (SAN) that is accessible from all the servers is not required. Expensive switches are not needed because point-to-point connections between the servers and the storage arrays normally provide the simplest and best attachments. (If failover capability is desired, the storage must be attached to multiple servers.)</para>
44 <para>For a production environment, it is preferable that the MGS have separate storage to allow future expansion to multiple file systems. However, it is possible to run the MDS and MGS on the same machine and have them share the same storage device.</para>
45 <para>For best performance in a production environment, dedicated clients are required. For a non-production Lustre environment or for testing, a Lustre client and server can run on the same machine. However, dedicated clients are the only supported configuration.</para>
46 <para>Performance and other issues can occur when an MDS or OSS and a client are running on the same machine:</para>
49 <para>Running the MDS and a client on the same machine can cause recovery and deadlock issues and impact the performance of other Lustre clients.</para>
52 <para>Running the OSS and a client on the same machine can cause issues with low memory and memory pressure. If the client consumes all the memory and then tries to write data to the file system, the OSS will need to allocate pages to receive data from the client but will not be able to perform this operation due to low memory. This can cause the client to hang.</para>
55 <para>Only servers running on 64-bit CPUs are tested and supported. 64-bit CPU clients are
56 typically used for testing to match expected customer usage and avoid limitations due to the 4
57 GB limit for RAM size, 1 GB low-memory limitation, and 16 TB file size limit of 32-bit CPUs.
58 Also, due to kernel API limitations, performing backups of Lustre software release 2.x. file
59 systems on 32-bit clients may cause backup tools to confuse files that have the same 32-bit
61 <para>The storage attached to the servers typically uses RAID to provide fault tolerance and can
62 optionally be organized with logical volume management (LVM), which is then formatted as a
63 Lustre file system. Lustre OSS and MDS servers read, write and modify data in the format
64 imposed by the file system.</para>
65 <para>The Lustre file system uses journaling file system technology on both the MDTs and OSTs.
66 For a MDT, as much as a 20 percent performance gain can be obtained by placing the journal on
67 a separate device.</para>
68 <para>The MDS can effectively utilize a lot of CPU cycles. A minimum of four processor cores are recommended. More are advisable for files systems with many clients.</para>
70 <para>Lustre clients running on architectures with different endianness are supported. One limitation is that the PAGE_SIZE kernel macro on the client must be as large as the PAGE_SIZE of the server. In particular, ia64 or PPC clients with large pages (up to 64kB pages) can run with x86 servers (4kB pages). If you are running x86 clients with ia64 or PPC servers, you must compile the ia64 kernel with a 4kB PAGE_SIZE (so the server page size is not larger than the client page size). </para>
74 <primary>setup</primary>
75 <secondary>MDT</secondary>
76 </indexterm> MGT and MDT Storage Hardware Considerations</title>
77 <para>MGT storage requirements are small (less than 100 MB even in the largest Lustre file
78 systems), and the data on an MGT is only accessed on a server/client mount, so disk
79 performance is not a consideration. However, this data is vital for file system access, so
80 the MGT should be reliable storage, preferably mirrored RAID1.</para>
81 <para>MDS storage is accessed in a database-like access pattern with many seeks and
82 read-and-writes of small amounts of data. High throughput to MDS storage is not important.
83 Storage types that provide much lower seek times, such as high-RPM SAS or SSD drives can be
84 used for the MDT.</para>
85 <para>For maximum performance, the MDT should be configured as RAID1 with an internal journal and two disks from different controllers.</para>
86 <para>If you need a larger MDT, create multiple RAID1 devices from pairs of disks, and then make a RAID0 array of the RAID1 devices. This ensures maximum reliability because multiple disk failures only have a small chance of hitting both disks in the same RAID1 device.</para>
87 <para>Doing the opposite (RAID1 of a pair of RAID0 devices) has a 50% chance that even two disk failures can cause the loss of the whole MDT device. The first failure disables an entire half of the mirror and the second failure has a 50% chance of disabling the remaining mirror.</para>
88 <para condition='l24'>If multiple MDTs are going to be present in the system, each MDT should be specified for the anticipated usage and load.</para>
89 <warning condition='l24'><para>MDT0 contains the root of the Lustre file system. If MDT0 is unavailable for any reason, the
90 file system cannot be used.</para></warning>
91 <note condition='l24'><para>Additional MDTs can be dedicated to sub-directories off the root file system provided by MDT0.
92 Subsequent directories may also be configured to have their own MDT. If an MDT serving a
93 subdirectory becomes unavailable this subdirectory and all directories beneath it will
94 also become unavailable. Configuring multiple levels of MDTs is an experimental feature
95 for the Lustre software release 2.4.</para></note>
98 <title><indexterm><primary>setup</primary><secondary>OST</secondary></indexterm>OST Storage Hardware Considerations</title>
99 <para>The data access pattern for the OSS storage is a streaming I/O pattern that is dependent on the access patterns of applications being used. Each OSS can manage multiple object storage targets (OSTs), one for each volume with I/O traffic load-balanced between servers and targets. An OSS should be configured to have a balance between the network bandwidth and the attached storage bandwidth to prevent bottlenecks in the I/O path. Depending on the server hardware, an OSS typically serves between 2 and 8 targets, with each target up to 128 terabytes (TBs) in size.</para>
100 <para>Lustre file system capacity is the sum of the capacities provided by the targets. For
101 example, 64 OSSs, each with two 8 TB targets, provide a file system with a capacity of
102 nearly 1 PB. If each OST uses ten 1 TB SATA disks (8 data disks plus 2 parity disks in a
103 RAID 6 configuration), it may be possible to get 50 MB/sec from each drive, providing up to
104 400 MB/sec of disk bandwidth per OST. If this system is used as storage backend with a
105 system network, such as the InfiniBand network, that provides a similar bandwidth, then each
106 OSS could provide 800 MB/sec of end-to-end I/O throughput. (Although the architectural
107 constraints described here are simple, in practice it takes careful hardware selection,
108 benchmarking and integration to obtain such results.)</para>
111 <section xml:id="dbdoclet.50438256_31079">
112 <title><indexterm><primary>setup</primary><secondary>space</secondary></indexterm>
113 <indexterm><primary>space</primary><secondary>determining requirements</secondary></indexterm>
114 Determining Space Requirements</title>
115 <para>The desired performance characteristics of the backing file systems on the MDT and OSTs
116 are independent of one another. The size of the MDT backing file system depends on the number
117 of inodes needed in the total Lustre file system, while the aggregate OST space depends on the
118 total amount of data stored on the file system. If MGS data is to be stored on the MDT device
119 (co-located MGT and MDT), add 100 MB to the required size estimate for the MDT.</para>
120 <para>Each time a file is created on a Lustre file system, it consumes one inode on the MDT and one inode for each OST object over which the file is striped. Normally, each file's stripe count is based on the system-wide default stripe count. However, this can be changed for individual files using the <literal>lfs setstripe</literal> option. For more details, see <xref linkend="managingstripingfreespace"/>.</para>
121 <para>In a Lustre ldiskfs file system, all the inodes are allocated on the MDT and OSTs when the file system is first formatted. The total number of inodes on a formatted MDT or OST cannot be easily changed, although it is possible to add OSTs with additional space and corresponding inodes. Thus, the number of inodes created at format time should be generous enough to anticipate future expansion.</para>
122 <para>When the file system is in use and a file is created, the metadata associated with that file is stored in one of the pre-allocated inodes and does not consume any of the free space used to store file data.</para>
124 <para>By default, the ldiskfs file system used by Lustre servers to store user-data objects
125 and system data reserves 5% of space that cannot be used by the Lustre file system.
126 Additionally, a Lustre file system reserves up to 400 MB on each OST for journal use and a
127 small amount of space outside the journal to store accounting data. This reserved space is
128 unusable for general storage. Thus, at least 400 MB of space is used on each OST before any
129 file object data is saved.</para>
133 <primary>setup</primary>
134 <secondary>MGT</secondary>
137 <primary>space</primary>
138 <secondary>determining MGT requirements</secondary>
139 </indexterm> Determining MGT Space Requirements</title>
140 <para>Less than 100 MB of space is required for the MGT. The size is determined by the number
141 of servers in the Lustre file system cluster(s) that are managed by the MGS.</para>
143 <section xml:id="dbdoclet.50438256_87676">
145 <primary>setup</primary>
146 <secondary>MDT</secondary>
149 <primary>space</primary>
150 <secondary>determining MDT requirements</secondary>
151 </indexterm> Determining MDT Space Requirements</title>
152 <para>When calculating the MDT size, the important factor to consider is the number of files
153 to be stored in the file system. This determines the number of inodes needed, which drives
154 the MDT sizing. To be on the safe side, plan for 2 KB per inode on the MDT, which is the
155 default value. Attached storage required for Lustre file system metadata is typically 1-2
156 percent of the file system capacity depending upon file size.</para>
157 <para>For example, if the average file size is 5 MB and you have 100 TB of usable OST space, then you can calculate the minimum number of inodes as follows:</para>
159 <para>(100 TB * 1024 GB/TB * 1024 MB/GB) / 5 MB/inode = 20 million inodes</para>
161 <para>We recommend that you use at least twice the minimum number of inodes to allow for future expansion and allow for an average file size smaller than expected. Thus, the required space is:</para>
163 <para>2 KB/inode * 40 million inodes = 80 GB</para>
165 <para>If the average file size is small, 4 KB for example, the Lustre file system is not very
166 efficient as the MDT uses as much space as the OSTs. However, this is not a common
167 configuration for a Lustre environment.</para>
169 <para>If the MDT is too small, this can cause all the space on the OSTs to be unusable. Be sure to determine the appropriate size of the MDT needed to support the file system before formatting the file system. It is difficult to increase the number of inodes after the file system is formatted.</para>
174 <primary>setup</primary>
175 <secondary>OST</secondary>
178 <primary>space</primary>
179 <secondary>determining OST requirements</secondary>
180 </indexterm> Determining OST Space Requirements</title>
181 <para>For the OST, the amount of space taken by each object depends on the usage pattern of
182 the users/applications running on the system. The Lustre software defaults to a conservative
183 estimate for the object size (16 KB per object). If you are confident that the average file
184 size for your applications will be larger than this, you can specify a larger average file
185 size (fewer total inodes) to reduce file system overhead and minimize file system check
186 time. See <xref linkend="dbdoclet.50438256_53886"/> for more details.</para>
189 <section xml:id="dbdoclet.50438256_84701">
191 <indexterm><primary>file system</primary><secondary>formatting options</secondary></indexterm>
192 <indexterm><primary>setup</primary><secondary>file system</secondary></indexterm>
193 Setting File System Formatting Options</title>
194 <para>By default, the <literal>mkfs.lustre</literal> utility applies these options to the Lustre
195 backing file system used to store data and metadata in order to enhance Lustre file system
196 performance and scalability. These options include:</para>
199 <para><literal>flex_bg</literal> - When the flag is set to enable this
200 flexible-block-groups feature, block and inode bitmaps for multiple groups are aggregated
201 to minimize seeking when bitmaps are read or written and to reduce read/modify/write
202 operations on typical RAID storage (with 1 MB RAID stripe widths). This flag is enabled on
203 both OST and MDT file systems. On MDT file systems the <literal>flex_bg</literal> factor
204 is left at the default value of 16. On OSTs, the <literal>flex_bg</literal> factor is set
205 to 256 to allow all of the block or inode bitmaps in a single <literal>flex_bg</literal>
206 to be read or written in a single I/O on typical RAID storage.</para>
209 <para><literal>huge_file</literal> - Setting this flag allows files on OSTs to be
210 larger than 2 TB in size.</para>
213 <para><literal>lazy_journal_init</literal> - This extended option is enabled to
214 prevent a full overwrite of the 400 MB journal that is allocated by default in a Lustre
215 file system, which reduces the file system format time.</para>
218 <para>To override the default formatting options, use arguments to
219 <literal>mkfs.lustre</literal> to pass formatting options to the backing file system:</para>
220 <screen>--mkfsoptions='backing fs options'</screen>
221 <para>For other <literal>mkfs.lustre</literal> options, see the Linux man page for
222 <literal>mke2fs(8)</literal>.</para>
223 <section xml:id="dbdoclet.50438256_pgfId-1293228">
225 <primary>inodes</primary>
226 <secondary>MDS</secondary>
227 </indexterm><indexterm>
228 <primary>setup</primary>
229 <secondary>inodes</secondary>
230 </indexterm>Setting Formatting Options for an MDT</title>
231 <para>The number of inodes on the MDT is determined at format time based on the total size of
232 the file system to be created. The default <emphasis role="italic"
233 >bytes-per-inode</emphasis> ratio ("inode ratio") for an MDT is optimized at one inode for
234 every 2048 bytes of file system space. It is recommended that this value not be changed for
236 <para>This setting takes into account the space needed for additional metadata, such as the
237 journal (up to 400 MB), bitmaps and directories, and a few files that the Lustre file system
238 uses to maintain cluster consistency.</para>
240 <section xml:id="dbdoclet.50438256_53886">
242 <primary>inodes</primary>
243 <secondary>OST</secondary>
244 </indexterm>Setting Formatting Options for an OST</title>
245 <para>When formatting OST file systems, it is normally advantageous to take local file system
246 usage into account. When doing so, try to minimize the number of inodes on each OST, while
247 keeping enough margin for potential variations in future usage. This helps reduce the format
248 and file system check time and makes more space available for data.</para>
249 <para>The table below shows the default <emphasis role="italic">bytes-per-inode
250 </emphasis>ratio ("inode ratio") used for OSTs of various sizes when they are formatted. </para>
253 <title xml:id="settinguplustresystem.tab1">Inode Ratios Used for Newly Formatted
256 <colspec colname="c1" colwidth="3*"/>
257 <colspec colname="c2" colwidth="2*"/>
258 <colspec colname="c3" colwidth="4*"/>
262 <para><emphasis role="bold">LUN/OST size</emphasis></para>
265 <para><emphasis role="bold">Inode ratio</emphasis></para>
268 <para><emphasis role="bold">Total inodes</emphasis></para>
275 <para> over 10GB </para>
278 <para> 1 inode/16KB </para>
281 <para> 640 - 655k </para>
286 <para> 10GB - 1TB </para>
289 <para> 1 inode/68kiB </para>
292 <para> 153k - 15.7M </para>
297 <para> 1TB - 8TB </para>
300 <para> 1 inode/256kB </para>
303 <para> 4.2M - 33.6M </para>
308 <para> over 8TB </para>
311 <para> 1 inode/1MB </para>
314 <para> 8.4M - 134M </para>
321 <para>In environments with few small files, the default inode ratio may result in far too many
322 inodes for the average file size. In this case, performance can be improved by increasing
323 the number of <emphasis role="italic">bytes-per-inode</emphasis>.To set the inode ratio, use
324 the <literal>-i</literal> argument to <literal>mkfs.lustre</literal> to specify the
325 <emphasis role="italic">bytes-per-inode</emphasis> value. </para>
327 <para>File system check time on OSTs is affected by a number of variables in addition to
328 the number of inodes, including the size of the file system, the number of allocated
329 blocks, the distribution of allocated blocks on the disk, disk speed, CPU speed, and the
330 amount of RAM on the server. Reasonable file system check times are 5-30 minutes per
333 <para>For more details about formatting MDT and OST file systems, see <xref
334 linkend="dbdoclet.50438208_51921"/>.</para>
338 <primary>setup</primary>
339 <secondary>limits</secondary>
340 </indexterm><indexterm xmlns:xi="http://www.w3.org/2001/XInclude">
341 <primary>wide striping</primary>
342 </indexterm><indexterm xmlns:xi="http://www.w3.org/2001/XInclude">
343 <primary>xattr</primary>
344 <secondary><emphasis role="italic">See</emphasis> wide striping</secondary>
345 </indexterm><indexterm>
346 <primary>large_xattr</primary>
347 <secondary>ea_inode</secondary>
348 </indexterm><indexterm>
349 <primary>wide striping</primary>
350 <secondary>large_xattr</secondary>
351 <tertiary>ea_inode</tertiary>
352 </indexterm>File and File System Limits</title>
353 <para><xref linkend="settinguplustresystem.tab2"/> describes file and file system size limits.
354 These limits are imposed by either the Lustre architecture or the Linux virtual file system
355 (VFS) and virtual memory subsystems. In a few cases, a limit is defined within the code and
356 can be changed by re-compiling the Lustre software (see <xref
357 linkend="installinglustrefromsourcecode"/>). In these cases, the indicated limit was used
358 for testing of the Lustre software. </para>
360 <title xml:id="settinguplustresystem.tab2">File and file system limits</title>
362 <colspec colname="c1" colwidth="3*"/>
363 <colspec colname="c2" colwidth="2*"/>
364 <colspec colname="c3" colwidth="4*"/>
368 <para><emphasis role="bold">Limit</emphasis></para>
371 <para><emphasis role="bold">Value</emphasis></para>
374 <para><emphasis role="bold">Description</emphasis></para>
381 <para> Maximum number of MDTs</para>
385 <para condition='l24'>4096</para>
388 <para>The Lustre software release 2.3 and earlier allows a maximum of 1 MDT per file
389 system, but a single MDS can host multiple MDTs, each one for a separate file
391 <para condition="l24">The Lustre software release 2.4 and later requires one MDT for
392 the root. Upto 4095 additional MDTs can be added to the file system and attached
393 into the namespace with remote directories.</para>
398 <para> Maximum number of OSTs</para>
404 <para>The maximum number of OSTs is a constant that can be changed at compile time.
405 Lustre file systems with up to 4000 OSTs have been tested.</para>
410 <para> Maximum OST size</para>
416 <para>This is not a <emphasis>hard</emphasis> limit. Larger OSTs are possible but
417 today typical production systems do not go beyond 128TB per OST. </para>
422 <para> Maximum number of clients</para>
428 <para>The maximum number of clients is a constant that can be changed at compile time.</para>
433 <para> Maximum size of a file system</para>
439 <para>Each OST or MDT on 64-bit kernel servers can have a file system up to 128 TB. On 32-bit systems, due to page cache limits, 16TB is the maximum block device size, which in turn applies to the size of OST on 32-bit kernel servers.</para>
440 <para>You can have multiple OST file systems on a single OSS node.</para>
445 <para> Maximum stripe count</para>
451 <para>This limit is imposed by the size of the layout that needs to be stored on disk and sent in RPC requests, but is not a hard limit of the protocol.</para>
456 <para> Maximum stripe size</para>
459 <para> < 4 GB</para>
462 <para>The amount of data written to each object before moving on to next object.</para>
467 <para> Minimum stripe size</para>
473 <para>Due to the 64 KB PAGE_SIZE on some 64-bit machines, the minimum stripe size is set to 64 KB.</para>
477 <para> Maximum object size</para> </entry>
482 <para>The amount of data that can be stored in a single object. An object
483 corresponds to a stripe. The ldiskfs limit of 16 TB for a single object applies.
484 Files can consist of up to 2000 stripes, each 16 TB in size. </para>
489 <para> Maximum <anchor xml:id="dbdoclet.50438256_marker-1290761" xreflabel=""/>file size</para>
492 <para> 16 TB on 32-bit systems</para>
494 <para> 31.25 PB on 64-bit systems</para>
497 <para>Individual files have a hard limit of nearly 16 TB on 32-bit systems imposed
498 by the kernel memory subsystem. On 64-bit systems this limit does not exist.
499 Hence, files can be 64-bits in size. An additional size limit of up to the number
500 of stripes is imposed, where each stripe is 16 TB.</para>
501 <para>A single file can have a maximum of 2000 stripes, which gives an upper single file limit of 31.25 PB for 64-bit systems. The actual amount of data that can be stored in a file depends upon the amount of free space in each OST on which the file is striped.</para>
506 <para> Maximum number of files or subdirectories in a single directory</para>
509 <para> 10 million files</para>
512 <para>The Lustre software uses the ldiskfs hashed directory code, which has a limit
513 of about 10 million files depending on the length of the file name. The limit on
514 subdirectories is the same as the limit on regular files.</para>
515 <para>Lustre file systems are tested with ten million files in a single
521 <para> Maximum number of files in the file system</para>
524 <para> 4 billion</para>
525 <para condition='l24'>4096 * 4 billion</para>
528 <para>The ldiskfs file system imposes an upper limit of 4 billion inodes. By default, the MDS file system is formatted with 2KB of space per inode, meaning 1 billion inodes per file system of 2 TB.</para>
529 <para>This can be increased initially, at the time of MDS file system creation. For more information, see <xref linkend="settinguplustresystem"/>.</para>
530 <para condition="l24">Each additional MDT can hold up to 4 billion additional files, depending
531 on available inodes and the distribution directories and files in the file
537 <para> Maximum length of a filename</para>
540 <para> 255 bytes (filename)</para>
543 <para>This limit is 255 bytes for a single filename, the same as in an ldiskfs file system.</para>
548 <para> Maximum length of a pathname</para>
551 <para> 4096 bytes (pathname)</para>
554 <para>The Linux VFS imposes a full pathname length of 4096 bytes.</para>
559 <para> Maximum number of open files for a Lustre file system</para>
565 <para>The Lustre software does not impose a maximum for the number of open files,
566 but the practical limit depends on the amount of RAM on the MDS. No
567 "tables" for open files exist on the MDS, as they are only linked in a
568 list to a given client's export. Each client process probably has a limit of
569 several thousands of open files which depends on the ulimit.</para>
577 <para condition="l22">In Lustre software releases prior to release 2.2, the maximum stripe
578 count for a single file was limited to 160 OSTs. In Lustre software release 2.2, the large
579 <literal>xattr</literal> feature ("wide striping") was added to support up to 2000 OSTs.
580 This feature is disabled by default at <literal>mkfs.lustre</literal> time. In order to
581 enable this feature, set the "<literal>-O large_xattr</literal>" or "<literal>-O ea_inode</literal>"
582 option on the MDT either by using <literal>--mkfsoptions</literal> at format time or by using
583 <literal>tune2fs</literal>. Using either "<literal>large_xattr</literal>" or "<literal>ea_inode</literal>"
584 results in "<literal>ea_inode</literal>" in the file system feature list.</para>
588 <section xml:id="dbdoclet.50438256_26456">
589 <title><indexterm><primary>setup</primary><secondary>memory</secondary></indexterm>Determining Memory Requirements</title>
590 <para>This section describes the memory requirements for each Lustre file system component.</para>
593 <indexterm><primary>setup</primary><secondary>memory</secondary><tertiary>client</tertiary></indexterm>
594 Client Memory Requirements</title>
595 <para>A minimum of 2 GB RAM is recommended for clients.</para>
598 <title><indexterm><primary>setup</primary><secondary>memory</secondary><tertiary>MDS</tertiary></indexterm>MDS Memory Requirements</title>
599 <para>MDS memory requirements are determined by the following factors:</para>
602 <para>Number of clients</para>
605 <para>Size of the directories</para>
608 <para>Load placed on server</para>
611 <para>The amount of memory used by the MDS is a function of how many clients are on the system, and how many files they are using in their working set. This is driven, primarily, by the number of locks a client can hold at one time. The number of locks held by clients varies by load and memory availability on the server. Interactive clients can hold in excess of 10,000 locks at times. On the MDS, memory usage is approximately 2 KB per file, including the Lustre distributed lock manager (DLM) lock and kernel data structures for the files currently in use. Having file data in cache can improve metadata performance by a factor of 10x or more compared to reading it from disk.</para>
612 <para>MDS memory requirements include:</para>
615 <para><emphasis role="bold">File system metadata</emphasis> : A reasonable amount of RAM needs to be available for file system metadata. While no hard limit can be placed on the amount of file system metadata, if more RAM is available, then the disk I/O is needed less often to retrieve the metadata.</para>
618 <para><emphasis role="bold">Network transport</emphasis> : If you are using TCP or other network transport that uses system memory for send/receive buffers, this memory requirement must also be taken into consideration.</para>
621 <para><emphasis role="bold">Journal size</emphasis> : By default, the journal size is 400 MB for each Lustre ldiskfs file system. This can pin up to an equal amount of RAM on the MDS node per file system.</para>
624 <para><emphasis role="bold">Failover configuration</emphasis> : If the MDS node will be used for failover from another node, then the RAM for each journal should be doubled, so the backup server can handle the additional load if the primary server fails.</para>
628 <title><indexterm><primary>setup</primary><secondary>memory</secondary><tertiary>MDS</tertiary></indexterm>Calculating MDS Memory Requirements</title>
629 <para>By default, 400 MB are used for the file system journal. Additional RAM is used for caching file data for the larger working set, which is not actively in use by clients but should be kept "hot" for improved access times. Approximately 1.5 KB per file is needed to keep a file in cache without a lock.</para>
630 <para>For example, for a single MDT on an MDS with 1,000 clients, 16 interactive nodes, and a 2 million file working set (of which 400,000 files are cached on the clients):</para>
632 <para>Operating system overhead = 512 MB</para>
633 <para>File system journal = 400 MB</para>
634 <para>1000 * 4-core clients * 100 files/core * 2kB = 800 MB</para>
635 <para>16 interactive clients * 10,000 files * 2kB = 320 MB</para>
636 <para>1,600,000 file extra working set * 1.5kB/file = 2400 MB</para>
638 <para>Thus, the minimum requirement for a system with this configuration is at least 4 GB of RAM. However, additional memory may significantly improve performance.</para>
639 <para>For directories containing 1 million or more files, more memory may provide a significant benefit. For example, in an environment where clients randomly access one of 10 million files, having extra memory for the cache significantly improves performance.</para>
643 <title><indexterm><primary>setup</primary><secondary>memory</secondary><tertiary>OSS</tertiary></indexterm>OSS Memory Requirements</title>
644 <para>When planning the hardware for an OSS node, consider the memory usage of several
645 components in the Lustre file system (i.e., journal, service threads, file system metadata,
646 etc.). Also, consider the effect of the OSS read cache feature, which consumes memory as it
647 caches data on the OSS node.</para>
648 <para>In addition to the MDS memory requirements mentioned in <xref linkend="dbdoclet.50438256_87676"/>, the OSS requirements include:</para>
651 <para><emphasis role="bold">Service threads</emphasis> : The service threads on the OSS node pre-allocate a 4 MB I/O buffer for each ost_io service thread, so these buffers do not need to be allocated and freed for each I/O request.</para>
654 <para><emphasis role="bold">OSS read cache</emphasis> : OSS read cache provides read-only
655 caching of data on an OSS, using the regular Linux page cache to store the data. Just
656 like caching from a regular file system in the Linux operating system, OSS read cache
657 uses as much physical memory as is available.</para>
660 <para>The same calculation applies to files accessed from the OSS as for the MDS, but the load is distributed over many more OSSs nodes, so the amount of memory required for locks, inode cache, etc. listed under MDS is spread out over the OSS nodes.</para>
661 <para>Because of these memory requirements, the following calculations should be taken as determining the absolute minimum RAM required in an OSS node.</para>
663 <title><indexterm><primary>setup</primary><secondary>memory</secondary><tertiary>OSS</tertiary></indexterm>Calculating OSS Memory Requirements</title>
664 <para>The minimum recommended RAM size for an OSS with two OSTs is computed below:</para>
666 <para>Ethernet/TCP send/receive buffers (4 MB * 512 threads) = 2048 MB</para>
667 <para>400 MB journal size * 2 OST devices = 800 MB</para>
668 <para>1.5 MB read/write per OST IO thread * 512 threads = 768 MB</para>
669 <para>600 MB file system read cache * 2 OSTs = 1200 MB</para>
670 <para>1000 * 4-core clients * 100 files/core * 2kB = 800MB</para>
671 <para>16 interactive clients * 10,000 files * 2kB = 320MB</para>
672 <para>1,600,000 file extra working set * 1.5kB/file = 2400MB</para>
673 <para> DLM locks + file system metadata TOTAL = 3520MB</para>
674 <para>Per OSS DLM locks + file system metadata = 3520MB/6 OSS = 600MB (approx.)</para>
675 <para>Per OSS RAM minimum requirement = 4096MB (approx.)</para>
677 <para>This consumes about 1,400 MB just for the pre-allocated buffers, and an additional 2 GB for minimal file system and kernel usage. Therefore, for a non-failover configuration, the minimum RAM would be 4 GB for an OSS node with two OSTs. Adding additional memory on the OSS will improve the performance of reading smaller, frequently-accessed files.</para>
678 <para>For a failover configuration, the minimum RAM would be at least 6 GB. For 4 OSTs on each OSS in a failover configuration 10GB of RAM is reasonable. When the OSS is not handling any failed-over OSTs the extra RAM will be used as a read cache.</para>
679 <para>As a reasonable rule of thumb, about 2 GB of base memory plus 1 GB per OST can be used. In failover configurations, about 2 GB per OST is needed.</para>
683 <section xml:id="dbdoclet.50438256_78272">
685 <primary>setup</primary>
686 <secondary>network</secondary>
687 </indexterm>Implementing Networks To Be Used by the Lustre File System</title>
688 <para>As a high performance file system, the Lustre file system places heavy loads on networks.
689 Thus, a network interface in each Lustre server and client is commonly dedicated to Lustre
690 file system traffic. This is often a dedicated TCP/IP subnet, although other network hardware
691 can also be used.</para>
692 <para>A typical Lustre file system implementation may include the following:</para>
695 <para>A high-performance backend network for the Lustre servers, typically an InfiniBand (IB) network.</para>
698 <para>A larger client network.</para>
701 <para>Lustre routers to connect the two networks.</para>
704 <para>Lustre networks and routing are configured and managed by specifying parameters to the
705 Lustre networking (<literal>lnet</literal>) module in
706 <literal>/etc/modprobe.d/lustre.conf</literal>.</para>
707 <para>To prepare to configure Lustre networking, complete the following steps:</para>
710 <para><emphasis role="bold">Identify all machines that will be running Lustre software and
711 the network interfaces they will use to run Lustre file system traffic. These machines
712 will form the Lustre network .</emphasis></para>
713 <para>A network is a group of nodes that communicate directly with one another. The Lustre
714 software includes Lustre network drivers (LNDs) to support a variety of network types and
715 hardware (see <xref linkend="understandinglustrenetworking"/> for a complete list). The
716 standard rules for specifying networks applies to Lustre networks. For example, two TCP
717 networks on two different subnets (<literal>tcp0</literal> and <literal>tcp1</literal>)
718 are considered to be two different Lustre networks.</para>
721 <para><emphasis role="bold">If routing is needed, identify the nodes to be used to route traffic between networks.</emphasis></para>
722 <para>If you are using multiple network types, then you will need a router. Any node with
723 appropriate interfaces can route Lustre networking (LNET) traffic between different
724 network hardware types or topologies --the node may be a server, a client, or a standalone
725 router. LNET can route messages between different network types (such as
726 TCP-to-InfiniBand) or across different topologies (such as bridging two InfiniBand or
727 TCP/IP networks). Routing will be configured in <xref linkend="configuringlnet"/>.</para>
730 <para><emphasis role="bold">Identify the network interfaces to include in or exclude from LNET. </emphasis>
732 <para>If not explicitly specified, LNET uses either the first available interface or a pre-defined default for a given network type. Interfaces that LNET should not use (such as an administrative network or IP-over-IB), can be excluded.</para>
733 <para>Network interfaces to be used or excluded will be specified using the lnet kernel module parameters networks and <literal>ip2netsas</literal> described in <xref linkend="configuringlnet"/>.</para>
736 <para><emphasis role="bold">To ease the setup of networks with complex network configurations, determine a cluster-wide module configuration.</emphasis></para>
737 <para>For large clusters, you can configure the networking setup for all nodes by using a single, unified set of parameters in the <literal>lustre.conf</literal> file on each node. Cluster-wide configuration is described in <xref linkend="configuringlnet"/>.</para>
741 <para>We recommend that you use 'dotted-quad' notation for IP addresses rather than host names to make it easier to read debug logs and debug configurations with multiple interfaces.</para>