Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Here we provide the details of the Linux VM on which we deploy PostgreSQL.

Table of Contents

Context

About Us

We ...

  • have little linux admin expertise
  • are linux users (bash, vi, sed, awk, grep, etc does not scare us)
  • have few resources (money, people, time)

...

  • simple is important
  • automation is important (we use bash and python)
About the Application

The application is...

  • not huge
  • not complex
  • not trivial either
  • not particularly resource intensive

...

  • will update and insert an average of 10-100 "street address records" per day
  • will issue 1K to 100K? reads per day (search, browse, report)
  • does a a modest amount of spatial processing (nearest streets, point in polygon, nearest addresses)
  • has no known or unresolved performance issue (we had a django ORM performance issue)
Security
  • the data is not sensitive
  • the cities network does contain sensitive information
  • the application is a business critical system
Downtime

Although the application is business critical, our downtime requirements are fairly lightweight.
Generally we can be down for an hour without people getting very excited.
If the application is down, the city will not be able to do things like issue building permits.
But let me be clear - we do not want people to get excited.
Downtime is scheduled off hours and communicated to our users well in advance.

Failover

Here again, the application is business critical but our requirements are fairly lightweight.
We are allowed to loose no more than 24 hours worth of data.
PG Experts has recommended we accomplish failover via log file shipping.

Facilities

We have 2 data centers (DC): San Diego (SD) and San Francisco (SF).
You'll need VPN credentials to access SF.
SD is "secondary", and is operated by Carinet.
SF is primary and is operated by the city.
We are running VM Ware 4.1.0
We using Centos 5.5.
We use Nagios 2.2 (yes, really! this is the city after all) for monitoring.

Now, About that VM...

We want a small core VM (< 1 GB?) so the VM copy/clone operations are network friendly and reasonably fast.
We want a minimal linux install (no desktop software, etc).

Recommendations

There are lots of details which are not specified here.
We'll lean on PG Experts to make recommendations as needed.
For example, for the file system we could ext3 or xfs.
I don't have an opinion on this, even after a lecture.
To help make decisions in these cases we prefer simplicity (see above) and consistency (see our other centos machines).

Memory

Size of database plus about 500 MB
We chose 8 GB.

Disk Partitions

PG Experts shall recommend a size for each partition.

Transaction Logs
Backups
OS
swap
system logging (/var/log)
PGDATA

To see how much space a server is currently using:
psql# select datname, pg_size_pretty(pg_database_size(datname)) from pg_database;
I do not have any data growth information.
But we know that street addresses do not change much in the city.
We do have one area of the application that (ab)uses audit tables - but I would be a little surprised if this became an issue.

Session with Spencer and Jeff Frost

new vm
custom
provide name
select hypervisor
select data store
select vm version: 7
select OS: centos 4/5 64 bit
select number of processors: 2
specify RAM> 8GB
specify NIC: 1 NIC
scsi controller: LSI Logic parallel
create new virtual disk

...