Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WuTGJ-0004l5-Sp for pgsql-performance@arkaria.postgresql.org; Tue, 10 Jun 2014 21:07:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WuTGI-0002Iu-Er for pgsql-performance@arkaria.postgresql.org; Tue, 10 Jun 2014 21:07:18 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1WuTGH-0002Id-Bf for pgsql-performance@postgresql.org; Tue, 10 Jun 2014 21:07:17 +0000 Received: from smtp2.peak6.com ([38.98.137.9]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WuTG9-000336-AB for pgsql-performance@postgresql.org; Tue, 10 Jun 2014 21:07:15 +0000 X-AuditID: 0a02cb20-f798c6d000007a0a-b9-5397737ae6eb Received: from sswchi5pcas1.peak6.net (Unknown_Domain [10.100.13.22]) (using TLS with cipher AES128-SHA (128/128 bits)) (Client did not present a certificate) by smtp2.peak6.com (Symantec Messaging Gateway) with SMTP id 5F.E0.31242.A7377935; Tue, 10 Jun 2014 16:07:06 -0500 (CDT) Received: from [10.10.220.56] (10.10.220.56) by sswchi5pcas1.peak6.net (10.100.13.25) with Microsoft SMTP Server (TLS) id 14.3.158.1; Tue, 10 Jun 2014 16:07:05 -0500 Message-ID: <53977376.3040406@optionshouse.com> Date: Tue, 10 Jun 2014 16:07:02 -0500 From: Shaun Thomas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Brio , Subject: Re: postgres files in use not staying in linux file cache References: In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed content-transfer-encoding: 7bit X-Originating-IP: [10.10.220.56] X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrFIsWRmVeSWpSXmKPExsXClcIrpltVPD3YYO0HPotZV++yWFyfeY7Z gclj56y77B4X9k1jD2CKamC0SczLyy9JLElVSEktTrZV8i8oyczPK/bILy1OVXDJLE7OSczM TS1SUshMsVUyVlIoyElMTs1NzSuxVUosKEjNS1Gy41LAADZAZZl5Cql5yfkpmXnptkqewf66 FhamlrqGSnbxyCChkyXjzpNf7AU/eSvmtP1jbWBcxN3FyMkhIWAicfXfLTYIW0ziwr31QDYX h5DAXCaJ1a//QDkrGSUWffnADlLFK6AvcfHzNyYQm0VAVWLiqZlgNpuArsSk/hVgk0QFwiQ+ Hl3HBlEvKHFy5hMWEFtEwFli4+GlYPXCAj4S75e3g9lCAgESx74cBarh4OAUCJTY9TcKJMws YCGx+M1BdghbXmL72znMEOWqEiuaJ7KBlEsIKAAdnTqBUXAWkmWzkHTPQtK9gJF5FaN4cVli ckamWUFxbkmBkV5BamK2mV5easkmRlCEMp1W2MG4ucfqEKMAB6MSD2+B7PRgIdbEsuLK3EOM EhzMSiK8NmlAId6UxMqq1KL8+KLSnNTiQ4w+wNCYyCwlmpwPTB55JfGGxqYGppamhqbmpoZG OISVxHmPtMQFCwmkA1NGdmpqQWoRzDgmDk6pBkbd/yfEDiiqvSiMfXV7QbDZpu0sF2JecMt9 6HwbcvTuxFwf9hXNbyKn6+u98j+j+PHng9CV2S9aON/KSRQ8mt3B6Xgv9GODwESH3zOUdk0+ x2bzaYLhTIaLTSpBp+w/e4lbe/U1yL+e5FUo5KZWobLF5t7T7W+vv1hbbNj98P5qzvtyUn6V geZKLMUZiYZazEXFiQBF7+AR/QIAAA== X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 06/05/2014 04:32 PM, Brio wrote: > So here's where I'm stuck. How can reading a file not leave it in the > Linux cache? I'd expect it to enter the inactive list (which is about > 80GB), so I'd expect another 80GB would need to be read before it would > be its turn to be evicted.... which should take a long time if my > maximum read speed is 100MB/s. So here's the thing. The Linux page reclamation code is *extremely broken* in everything before 3.11. Take a look at this, then realize that this is *only one patch* from several that target the memory manager weightings: http://linux-kernel.2935.n7.nabble.com/patch-v2-0-3-mm-improve-page-aging-fairness-between-zones-nodes-td696105.html This is especially true of the 3.2 kernel you're using. It's extremely aggressive about ageing pages out of memory when there's high memory pressure from frequent disk reads. Chances of promotion into the active set is dismal, so you end up with a constant churn between inactive and disk. Worse, if you kick it hard enough by having too many PostgreSQL backends using memory, it'll actively purge the active set while still failing to promote the inactive set. The dev that linked me to this patch said he tested it against 3.10, meaning it probably went into 3.11 or 3.12. So I personally wouldn't trust anything before 3.13. :p Since you're using Ubuntu 12.04, I strongly suggest upgrading your core to 12.04.4 and apply the linux-generic-lts-saucy pseudo-package to at least get onto the 3.11 instead. The 3.2 kernel is pants-on-head retarded; we've had a lot more luck with 3.8 and above. Cheers! -- Shaun Thomas OptionsHouse, LLC | 141 W. Jackson Blvd. | Suite 800 | Chicago IL, 60604 312-676-8870 sthomas@optionshouse.com ______________________________________________ See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance