Pages

Jignesh Shah: Read Only Scalability Patch

Simon Riggs of 2nd Quadrant recently submitted a patch for testing which should improve read only scalability of Postgres. I took it for a test drive for my setup. In the first set of tests I used the same benchmark as previous ones so as to have the same reference point.

It seems changing the Number of Buffer Partitions for this workload does not have any impact. My dataset for this iGen benchmark is pretty small and should easily fit under 2GB size and hence may not be stressing the buffer partitions too much to warrant bigger number. The patch still helps to get good healthy 4-6% gain in peak values.

Pavel Golub: Non-obvious ALTER statements are gone

Decided to read PostgreSQL 8.4 Release notes before going to sleep and was pleasantly surprised. The fact of ALTER statements mess (which I described in my post) is now fixed:

Modify the ALTER TABLE syntax to allow all reasonable combinations for tables, indexes, sequences, and views (Tom)

This change allows the following new syntaxes:

  • ALTER SEQUENCE OWNER TO
  • ALTER VIEW ALTER COLUMN SET/DROP DEFAULT
  • ALTER VIEW OWNER TO
  • ALTER VIEW SET SCHEMA

There is no actual new functionality here, but formerly you had to say ALTER TABLE to do these things, which was confusing.

Cool! Way to go!

Hubert Lubaczewski: explain.depesz.com - update

I just modified the internals of explain.depesz.com. Now, it finally stores the plans in database (previously it stored the plans as files in dedicated directory).
Effect for enduser is just that history page should load faster.
But, having the data in database makes it possible to add more features.
One such feature is already added - ability to [...]

Jignesh Shah: Postgres 8.4 Testing with new JDBC Drivers

At PGCon 2009, Jesper Pedersen talked to me about the new Binary Transfer patch which was submitted to the JDBC Driver for Postgres 8.4. I thought it will be nice to compare how the JDBC 8.4 driver compared to older 8.3 JDBC Driver. Hence I took it for a drive

The 8.4 JDBC Driver with BinaryTransfer patch seems to get to a better peak faster but since to taper off at high clients. I don’t know if this benchmark was the right benchmark for it. Need more benchmarks which uses JDBC to see the performance difference with this feature.

David Wheeler: pgTAP 0.21 Drops

I just dropped a new version of pgTAP, following a few marathon hack sessions since my talk at PGCon (movie here, BTW). Actually, the new performs_ok() function came about as I wrote the presentation, but all the rest came on the flight home and in the few days since. Not sure when I’ll hack on it this much again (it’s getting a bit big at 5,758 lines of PL/pgSQL and SQL).

Read More »

Scott Bailey: In-database ETL

scottrbailey

Josh Berkus: PostgreSQL Development Priorities

One of the things I spoke about last year, and this year again at the Developer meeting, was what should be our highest priorities for technical development to drive PostgreSQL adoption. That is, what features would make PostgreSQL attractive to the greatest number of users, or remove obstacles to adoption for the most people.

Pavel Golub: PostgreSQL-8.4 Beta2 Windows installation issue

First of all, we have faced with the new brand installer provided by EnterpriseDB. Who cares… :)

Anyway. I was asked about ‘postgres’ service account password.

First of all, I didn’t remember if I specified it for previous installations at all (when it was, without a doubt, created). And the last but not least, I had no idea how to get this password or even change it.

God bless Internet and Google his prophet.

warning For whom it may concern! To fix this “neponyatka” (непонятка, rus. – thingy plunged smb into stupor) go to Control Panel -> Administrative Tools -> Computer Management -> System Tools -> Local Users and Groups -> Users and there you may delete ‘postgres’ account, or change it password.

May the force be with you young postgresmen!

Jignesh Shah: Postgres on OpenSolaris using Quad Cores: Use FX Scheduler

During my PGCon 2009 presentation there was a question on the saw tooth nature of the workload results on the high end side of benchmark runs. To which Matthew Wilcox (from Intel) commented it could be scheduler related. I did not give it much thought at that time till today when I was trying to do some iGen runs for the JDBC Binary Transfer patch (more on that in another blog post) and also Simon’s read only scalability runs . Then I realized that I was not following one of my one tuning advice for running Postgres on OpenSolaris. The advice is to  use FX Class of scheduler instead of the default TS Class on OpenSolaris . More details on various scheduler classes can be found on docs.sun.com.

Now how many times I have forgotten to do that with Postgres on OpenSolaris I have no idea. But yes it is highly recommended specially on multi-core systems to use FX scheduler class for Postgres on OpenSolaris. How much gain are we talking about? The following graph will give an indication using the default TS scheduler class Vs the FX Scheduler class using the iGen benchmark.

The gain is about 14% by just switching over to FX Class. How did I get Postgres server instance to use FX class? I cheated and put all processes of the user (with userid 236177)  in FX class using the following command line.

# priocntl -s -c FX -i uid 236177

One thing to figure out is how to make sure Postgres uses FX scheduler class out of the box on OpenSolaris so I don’t keep forgetting about that minute performance tip.

Kenny Gorman: Fusion-io SSD

I got the opportunity to test out some of the new Fusion-io Solid State ioDrive, and I thought I would post some results.

Fusion-io has created a SSD product called ioDrive that is based on PCIe cards vs replacing SAS or SATA drives with SSD directly. This approach allows for much lower latency because of the use of the PCIe bus vs traditional disk channels geared towards slow disk. The 320GB model I used in my test are made of Multi Level Cell (MLC) NAND flash and are quoted by Fusion-io to achieve throughput somewhere in the 70k IOPS neighborhood.

For this test I used two identical Dell 2970 boxes, one using a 6 disk RAID 10 disk, and the other using a single Fusion-io 320GB NAND flash PCIe card. Here are the important configuration items:
- Dell 2970 2u
- (6) SAS disk RAID 10 with Perc6i controller or Fusion-io 320GB PCIe ioDrive.
- 32GB RAM
- Quad-Core AMD Opteron(tm) Processor 2347 HE 1895 MHZ 512 KB Cache
- SuSE linux; 2.6.16.46-0.12-smp x86_64
- VxFS file system with 8k block size and cached I/O
- PostgreSQL 8.2.4 with 2GB buffer cache and fsync=on
- All data on the same mount point; /data

The test I used is a custom set of pgbench scripts that represent a real world workload. The script is launched from a third host and is not run on the database host itself. The test is about 80% reads and about 20% writes. The test does not perform deletes, just select,insert,update. Typical queries are index range scan type queries where multiple rows are fetched per result set.

The performance was measured using pgstat.

The test results are shown below. Some interesting things to note:
- Notice about 400% peak improvement in performance using SSD.
- Notice at about 25 concurrent backends the machine with SSD starts to degrade.
- Notice at about 100 concurrent backends the machine with disk starts to degrade.

fusionio

When considering SSD there are some new things to think about vs traditional disk. In this test I used RAID10 for SAS drives and a single Fusion-io 320GB card. Unfair? Perhaps a bit, but one thing to consider is that SSD is more reliable than traditional disk even though it has a limited lifetime. Another thing to consider is the machine with SSD does not need as much RAM because the disk is so fast. So comparing disk to SSD directly is not always a perfect comparison. In the real world I would run 8GB of RAM on the SSD machine, and perhaps run RAID1 of 2 cards. Here is a white-paper outlining some of the differences. One other item to note is because SSD’s lifetime is effected by number of writes being performed to the drive. So RAID5 while economical could cause premature end of lifetime (writing all the parity).

The Fusion-io cards are simple to install and configure. The drivers are available on

A note about random writes. Random writes on SSD are the Achilles Heel. My tests perform random writes because this is what our workload really does. To speed up random writes some tuning measures can be performed. The Fusion-io architecture employs a background process that performs writes to the SSD media. This process can become overwhelmed, and in order to speed it up more scratch space needs to be used in a high random write environment. So formatting the disk space with less usable, and more reserve may result in a speed up in performance. This is done at format time with the fio-format tool. So test before you deploy to see what free space percentage works well with your workload. If I can grab some more time I will do so and add the results to my initial testing.

In terms of price these units are fairly expensive, but coming down in price. If you consider the TPS/$ factor then SSD is fairly competitive and when you add in the form factor savings (more TPS per U) as well as power savings; now might be about the time to jump into some Fusion-io SSD’s.