~ubuntu-branches/ubuntu/vivid/drizzle/vivid

« back to all changes in this revision

Viewing changes to tests/test_tools/sql-bench/Comments/postgres.benchmark

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs
  • Date: 2013-10-29 15:43:40 UTC
  • mfrom: (20.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20131029154340-j36v7gxq9tm1gi5f
Tags: 1:7.2.3-2ubuntu1
* Merge from debian, remaining changes:
  - Link against boost_system because of boost_thread.
  - Add required libs to message/include.am
  - Add upstart job and adjust init script to be upstart compatible.
  - Disable -floop-parallelize-all due to gcc-4.8/4.9 compiler ICE
    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57732

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This file describes how to run MySQL benchmark suite with PostgreSQL
 
2
#
 
3
# WARNING:
 
4
#
 
5
# Don't run the --fast test on a PostgreSQL 7.1.1 database on
 
6
# which you have any critical data; During one of our test runs
 
7
# PostgreSQL got a corrupted database and all data was destroyed!
 
8
# When we tried to restart postmaster, It died with a
 
9
# 'no such file or directory' error and never recovered from that!
 
10
#
 
11
# Another time vacuum() filled our system disk with had 6G free
 
12
# while vaccuming a table of 60 M.
 
13
#
 
14
# WARNING
 
15
 
 
16
# The test was run on a Intel Xeon 2x 550 Mzh machine with 1G memory,
 
17
# 9G hard disk.  The OS is Suse 7.1, with Linux 2.4.2 compiled with SMP
 
18
# support
 
19
# Both the perl client and the database server is run
 
20
# on the same machine. No other cpu intensive process was used during
 
21
# the benchmark.
 
22
#
 
23
# During the test we run PostgreSQL with -o -F, not async mode (not ACID safe)
 
24
# because when we started postmaster without -o -F, PostgreSQL log files
 
25
# filled up a 9G disk until postmaster crashed.
 
26
# We did however notice that with -o -F, PostgreSQL was a magnitude slower
 
27
# than when not using -o -F.
 
28
 
 
29
#
 
30
# First, install postgresql-7.1.2.tar.gz
 
31
 
 
32
# Adding the following lines to your ~/.bash_profile or
 
33
# corresponding file. If you are using csh, use �setenv�.
 
34
 
 
35
export POSTGRES_INCLUDE=/usr/local/pg/include
 
36
export POSTGRES_LIB=/usr/local/pg/lib
 
37
 
 
38
PATH=$PATH:/usr/local/pg/bin
 
39
MANPATH=$MANPATH:/usr/local/pg/man
 
40
 
 
41
#
 
42
# Add the following line to /etc/ld.so.conf:
 
43
#
 
44
 
 
45
/usr/local/pg/lib
 
46
 
 
47
# and run:
 
48
 
 
49
ldconfig
 
50
 
 
51
# untar the postgres source distribution,  cd to postgresql-*
 
52
# and run the following commands:
 
53
 
 
54
CFLAGS=-O3 ./configure
 
55
gmake
 
56
gmake install
 
57
 
 
58
mkdir /usr/local/pg/data
 
59
chown postgres /usr/local/pg/data
 
60
su - postgres
 
61
/usr/local/pg/bin/initdb -D /usr/local/pg/data
 
62
/usr/local/pg/bin/postmaster -o -F -D /usr/local/pg/data &
 
63
/usr/local/pg/bin/createdb test
 
64
exit
 
65
 
 
66
#
 
67
# Second, install packages DBD-Pg-1.00.tar.gz and DBI-1.18.tar.gz,
 
68
# available from http://www.perl.com/CPAN/
 
69
 
 
70
export POSTGRES_LIB=/usr/local/pg/lib/
 
71
export POSTGRES_INCLUDE=/usr/local/pg/include/postgresql
 
72
perl Makefile.PL
 
73
make
 
74
make install
 
75
 
 
76
#
 
77
# Now we run the test that can be found in the sql-bench directory in the
 
78
# MySQL 3.23 source distribution.
 
79
#
 
80
# We did run two tests:
 
81
# The standard test
 
82
 
 
83
run-all-tests --comment="Intel Xeon, 2x550 Mhz, 512M, pg started with -o -F" --user=postgres --server=pg --cmp=mysql
 
84
 
 
85
# When running with --fast we run the following vacuum commands on
 
86
# the database between each major update of the tables:
 
87
# vacuum anlyze table
 
88
# vacuum table
 
89
# or
 
90
# vacuum analyze
 
91
# vacuum
 
92
 
 
93
# The time for vacuum() is accounted for in the book-keeping() column, not
 
94
# in the test that updates the database.
 
95
 
 
96
run-all-tests --comment="Intel Xeon, 2x550 Mhz, 512M, pg started with -o -F" --user=postgres --server=pg --cmp=mysql --fast
 
97
 
 
98
# If you want to store the results in a output/RUN-xxx file, you should
 
99
# repeate the benchmark with the extra option --log --use-old-result
 
100
# This will create a the RUN file based of the previous results
 
101
 
 
102
run-all-tests --comment="Intel Xeon, 2x550 Mhz, 512M, pg started with -o -F" --user=postgres --server=pg --cmp=mysql --log --use-old-result
 
103
run-all-tests --comment="Intel Xeon, 2x550 Mhz, 512MG, pg started with -o -F" --user=postgres --server=pg --cmp=mysql --fast --log --use-old-result
 
104
 
 
105
# Between running the different tests we dropped and recreated the PostgreSQL
 
106
# database to ensure that PostgreSQL should get a clean start,
 
107
# independent of the previous runs.