<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="generator" content="HTML Tidy for Windows (vers 25 March 2009), see www.w3.org">
<meta name="Generator" content="MS Exchange Server version 14.02.0247.001">
<title>Re: [Lustre-discuss] Lustre buffer cache causes large system overhead.</title>
</head>
<body>
Watch for swapping now. Turning zone reclaim on can cause the machine to swap if the memory use goes outside of the NUMA node.<br>
<br>
Although you don't have much memory(which IMHO is the real issue)<br>
so this may not effect you.<br>
<br>
-----Original Message-----<br>
<b>From:&nbsp;</b>Dragseth Roy Einar [<a href="mailto:roy.dragseth@uit.no">roy.dragseth@uit.no</a>]<br>
<b>Sent:&nbsp;</b>Friday, August 23, 2013 03:09 PM Central Standard Time<br>
<b>To:&nbsp;</b>lustre-discuss@lists.lustre.org<br>
<b>Subject:&nbsp;</b>Re: [Lustre-discuss] Lustre buffer cache causes large system overhead.<br>
<br>
<!-- Converted from text/plain format -->
<p><font size="2">Thanks for the suggestion!&nbsp; It didn't help, but as I read the documentation on<br>
vfs_cache_pressure in the kernel docs I noticed the next parameter,<br>
zone_reclaim_mode, which looked like it might be worth fiddling with.&nbsp; And what<br>
do you know, changing it from 0 to 1 made the system overhead vanish<br>
immediately!<br>
<br>
I must admit I do not completely understand why this helps, but it seems to do<br>
the trick in my case.&nbsp; We'll put<br>
<br>
vm.zone_reclaim_mode = 1<br>
<br>
into /etc/sysctl.conf from now on.<br>
<br>
Thanks to all for the hints and comments on this.<br>
<br>
A nice weekend to everyone, mine for sure is going to be...<br>
r.<br>
<br>
<br>
On Friday 23. August 2013 09.36.34 Scott Nolin wrote:<br>
&gt; You might also try increasing the vfs_cache_pressure.<br>
&gt;<br>
&gt; This will reclaim inode and dentry caches faster. Maybe that's the<br>
&gt; problem, not page caches.<br>
&gt;<br>
&gt; To be clear - I have no deep insight into Lustre's use of the client<br>
&gt; cache, but you said you has lots of small files, which if lustre uses<br>
&gt; the cache system like other filesystems means it may be inodes/dentries.<br>
&gt; Filling up the page cache with files like you did in your other tests<br>
&gt; wouldn't have the same effect. Just my guess here.<br>
&gt;<br>
&gt; We had some experience years ago with the opposite sort of problem. We<br>
&gt; have a big ftp server, and we want to *keep* inode/dentry data in the<br>
&gt; linux cache, as there are often stupid numbers of files in directories.<br>
&gt; Files were always flowing through the server, so the page cache would<br>
&gt; force out the inode cache. Was surprised to find with linux there's no<br>
&gt; ability to set a fixed inode cache size - the best you can do is<br>
&gt; &quot;suggest&quot; with the cache pressure tunable.<br>
&gt;<br>
&gt; Scott<br>
&gt;<br>
&gt; On 8/23/2013 6:29 AM, Dragseth Roy Einar wrote:<br>
&gt; &gt; I tried to change swapiness from 0 to 95 but it did not have any impact on<br>
&gt; &gt; the system overhead.<br>
&gt; &gt;<br>
&gt; &gt; r.<br>
&gt; &gt;<br>
&gt; &gt; On Thursday 22. August 2013 15.38.37 Dragseth Roy Einar wrote:<br>
&gt; &gt;&gt; No, I cannot detect any swap activity on the system.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; r.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; On Thursday 22. August 2013 09.21.33 you wrote:<br>
&gt; &gt;&gt;&gt; Is this slowdown due to increased swap activity?&nbsp; If &quot;yes&quot;, then try<br>
&gt; &gt;&gt;&gt; lowering the &quot;swappiness&quot; value.&nbsp; This will sacrifice buffer cache space<br>
&gt; &gt;&gt;&gt; to<br>
&gt; &gt;&gt;&gt; lower swap activity.<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; Take a look at <a href="http://en.wikipedia.org/wiki/Swappiness">http://en.wikipedia.org/wiki/Swappiness</a>.<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; Roger S.<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; On 08/22/2013 08:51 AM, Roy Dragseth wrote:<br>
&gt; &gt;&gt;&gt;&gt; We have just discovered that a large buffer cache generated from<br>
&gt; &gt;&gt;&gt;&gt; traversing a lustre file system will cause a significant system<br>
&gt; &gt;&gt;&gt;&gt; overhead<br>
&gt; &gt;&gt;&gt;&gt; for applications with high memory demands.&nbsp; We have seen a 50% slowdown<br>
&gt; &gt;&gt;&gt;&gt; or worse for applications.&nbsp; Even High Performance Linpack, that have no<br>
&gt; &gt;&gt;&gt;&gt; file IO whatsoever is affected.&nbsp; The only remedy seems to be to empty<br>
&gt; &gt;&gt;&gt;&gt; the<br>
&gt; &gt;&gt;&gt;&gt; buffer cache from memory by running &quot;echo 3 &gt; /proc/sys/vm/drop_caches&quot;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; Any hints on how to improve the situation is greatly appreciated.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; System setup:<br>
&gt; &gt;&gt;&gt;&gt; Client: Dual socket Sandy Bridge, with 32GB ram and infiniband<br>
&gt; &gt;&gt;&gt;&gt; connection<br>
&gt; &gt;&gt;&gt;&gt; to lustre server.&nbsp; CentOS 6.4, with kernel 2.6.32-358.11.1.el6.x86_64<br>
&gt; &gt;&gt;&gt;&gt; and<br>
&gt; &gt;&gt;&gt;&gt; lustre v2.1.6 rpms downloaded from whamcloud download site.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; Lustre: 1 MDS and 4 OSS running Lustre 2.1.3 (also from whamcloud<br>
&gt; &gt;&gt;&gt;&gt; site).<br>
&gt; &gt;&gt;&gt;&gt; Each OSS has 12 OST, total 1.1 PB storage.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; How to reproduce:<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; Traverse the lustre file system until the buffer cache is large enough.<br>
&gt; &gt;&gt;&gt;&gt; In our case we run<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;&nbsp;&nbsp;&nbsp; find . -print0 -type f | xargs -0 cat &gt; /dev/null<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; on the client until the buffer cache reaches ~15-20GB.&nbsp; (The lustre<br>
&gt; &gt;&gt;&gt;&gt; file<br>
&gt; &gt;&gt;&gt;&gt; system has lots of small files so this takes up to an hour.)<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; Kill the find process and start a single node parallel application, we<br>
&gt; &gt;&gt;&gt;&gt; use<br>
&gt; &gt;&gt;&gt;&gt; HPL (high performance linpack).&nbsp; We run on all 16 cores on the system<br>
&gt; &gt;&gt;&gt;&gt; with 1GB ram per core (a normal run should complete in appr. 150<br>
&gt; &gt;&gt;&gt;&gt; seconds.)&nbsp; The system monitoring shows a 10-20% system cpu overhead and<br>
&gt; &gt;&gt;&gt;&gt; the HPL run takes more than 200 secs.&nbsp; After running &quot;echo 3 &gt;<br>
&gt; &gt;&gt;&gt;&gt; /proc/sys/vm/drop_caches&quot; the system performance goes back to normal<br>
&gt; &gt;&gt;&gt;&gt; with<br>
&gt; &gt;&gt;&gt;&gt; a run time at 150 secs.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; I've created an infographic from our ganglia graphs for the above<br>
&gt; &gt;&gt;&gt;&gt; scenario.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; <a href="https://dl.dropboxusercontent.com/u/23468442/misc/lustre_bc_overhead.pn">
https://dl.dropboxusercontent.com/u/23468442/misc/lustre_bc_overhead.pn</a><br>
&gt; &gt;&gt;&gt;&gt; g<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; Attached is an excerpt from perf top indicating that the kernel routine<br>
&gt; &gt;&gt;&gt;&gt; taking the most time is _spin_lock_irqsave if that means anything to<br>
&gt; &gt;&gt;&gt;&gt; anyone.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; Things tested:<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; It does not seem to matter if we mount lustre over infiniband or<br>
&gt; &gt;&gt;&gt;&gt; ethernet.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; Filling the buffer cache with files from an NFS filesystem does not<br>
&gt; &gt;&gt;&gt;&gt; degrade<br>
&gt; &gt;&gt;&gt;&gt; performance.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; Filling the buffer cache with one large file does not give degraded<br>
&gt; &gt;&gt;&gt;&gt; performance. (tested with iozone)<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; Again, any hints on how to proceed is greatly appreciated.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; Best regards,<br>
&gt; &gt;&gt;&gt;&gt; Roy.<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; _______________________________________________<br>
&gt; &gt;&gt;&gt;&gt; Lustre-discuss mailing list<br>
&gt; &gt;&gt;&gt;&gt; Lustre-discuss@lists.lustre.org<br>
&gt; &gt;&gt;&gt;&gt; <a href="http://lists.lustre.org/mailman/listinfo/lustre-discuss">http://lists.lustre.org/mailman/listinfo/lustre-discuss</a><br>
--<br>
<br>
&nbsp; The Computer Center, University of Tromsų, N-9037 TROMSŲ Norway.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; phone:&#43;47 77 64 41 07, fax:&#43;47 77 64 41 00<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Roy Dragseth, Team Leader, High Performance Computing<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Direct call: &#43;47 77 64 62 56. email: roy.dragseth@uit.no<br>
_______________________________________________<br>
Lustre-discuss mailing list<br>
Lustre-discuss@lists.lustre.org<br>
<a href="http://lists.lustre.org/mailman/listinfo/lustre-discuss">http://lists.lustre.org/mailman/listinfo/lustre-discuss</a><br>
</font></p>
</body>
</html>