From: | "Martin Langhoff" <martin(dot)langhoff(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | "XS Devel" <server-devel(at)lists(dot)laptop(dot)org> |
Subject: | Pg 8.3 tuning recommendations for embedded low-memory device (for OLPC :-) ) |
Date: | 2008-09-14 23:55:57 |
Message-ID: | 46a038f90809141655o27e2adc4ta315ac649b8135f9@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I am working on the School Server (aka XS: a Fedora 9 spin, tailored
to run on fairly limited hw), I'm preparing the configuration settings
for it. It's a somewhat new area for me -- I've done a lot of tuning
with Pg 7.4 to 8.2 on mid-range hardware (several GBs RAM, RAID
controllers, many spindles, etc) and written and maintained lots of sw
that uses Pg... but this is... different. So I'm interested in hearing
from other people that may be working in similar low-mem
configurations.
In brief:
- The workload is relatively "light": mainly Moodle and Mediawiki.
Small datasets, but those webapps are somewhat "intensive" in that
they'll do >30 SELECTs + 1 INSERT (to a log table) before they serve
a page. To make things more interesting, we sometimes get teachers
saying "and now we all click [OK]" -- on the apache/php side there are
a few tricks to tame the thundering herd, but Pg will still have to
handle some sudden traffic spikes. I'll patch that INSERT on the
webapp side to use the new async commits.
- The XS will (in some locations) be hooked to *very* unreliable
power... uncontrolled shutdowns are the norm. I don't expect this to
be a problem with Pg :-)
- After a bad shutdown, graceful recovery is the most important
aspect. If a few transactions were lost we can cope.
- The XS hardware runs many services (mostly webbased), so Pg gets
only a limited slice of memory. To make matters worse, I *really*
don't want the webservices processes (Pg, Apache/PHP) to get paged
out. So I am interested in pegging the max (non-mmapped) memory Pg
will take.
- The XS hw is varied. In small schools it may have 256MB RAM (likely
to be running on XO hardware + usb-connected ext hard-drive).
Medium-to-large schools will have the recommended 1GB RAM and a cheap
SATA disk. A few very large schools will be graced with more RAM (2 or
4GB).
... so RAM allocation for Pg will prob range between 32MB at the
lower-end and 128MB/196MB at the 1GB "recommended" RAM.
My main question is: for the moodle/mediawiki workload, how would you
tune Pg 8.3 so that
- it does not allocate directly more than 32MB / 196MB? (Here, I
assume that the linux kernel with be smart about mmapped stuff. Is
that a reasonable assumption with current kernels and Pg?)
- still gives us good thoughput? :-)
cheers,
m
--
martin(dot)langhoff(at)gmail(dot)com
martin(at)laptop(dot)org -- School Server Architect
- ask interesting questions
- don't get distracted with shiny stuff - working code first
- http://wiki.laptop.org/go/User:Martinlanghoff
From | Date | Subject | |
---|---|---|---|
Next Message | Martin Langhoff | 2008-09-15 00:56:55 | Re: Pg 8.3 tuning recommendations for embedded low-memory device (for OLPC :-) ) |
Previous Message | Jack Orenstein | 2008-09-14 15:32:14 | Re: Autocommit, isolation level, and vacuum behavior |