The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]



"Раздел полезных советов: Опыт настройки связки PostgreSQL и ..."
Версия для распечатки Пред. тема | След. тема
Форум Разговоры, обсуждение новостей
Исходное сообщение [ Отслеживать ]
Присылайте удачные настройки в раздел примеров файлов конфигурации на WIKI.opennet.ru.
. "Опыт настройки связки PostgreSQL и 1С в Oracle Linux" +/
Сообщение от alexpn (ok), 08-Сен-11, 11:20 
Вот что нашел на
http://www.westnet.com/~gsmith/content/postgresql/pgbench.htm

#!/bin/sh
DB=alex
tottrans=10000
c=1
t=`expr $tottrans / $c`
echo Cleaning up database $DB
psql -c 'truncate table history' $DB
psql -c 'vacuum' $DB
psql -c 'vacuum full' $DB
psql -c 'vacuum analyze' $DB
psql -c 'checkpoint' $DB
echo $t transactions for each of $c concurrent users... 1>&2
/usr/pgsql/bin/pgbench -l -N -n -t $t -c $c $DB &
p=$!
wait $p
mv pgbench_log.${p} pgbench.log
cat pgbench.log | cut -f 3 -d " " | sort -n | tail

зашел как
su - postgres
запустил
вот результат

Cleaning up database alex
ERROR:  relation "history" does not exist
VACUUM
VACUUM
VACUUM
CHECKPOINT
10000 transactions for each of 1 concurrent users...
transaction type: Update only pgbench_accounts
scaling factor: 1
query mode: simple
number of clients: 1
number of threads: 1
number of transactions per client: 10000
number of transactions actually processed: 10000/10000
tps = 1708.830347 (including connections establishing)
tps = 1709.843054 (excluding connections establishing)
1039
1044
1092
1363
1477
1725
3119
3593
4846
11795

при с=10

Cleaning up database alex
ERROR:  relation "history" does not exist
VACUUM
VACUUM
VACUUM
CHECKPOINT
1000 transactions for each of 10 concurrent users...
transaction type: Update only pgbench_accounts
scaling factor: 1
query mode: simple
number of clients: 10
number of threads: 1
number of transactions per client: 1000
number of transactions actually processed: 10000/10000
tps = 2419.187642 (including connections establishing)
tps = 2439.170740 (excluding connections establishing)
17329
17489
17886
17899
17913
17953
18222
18224
24267
26417

Ответить | Правка | Наверх | Cообщить модератору

Оглавление
Раздел полезных советов: Опыт настройки связки PostgreSQL и ..., auto_tips, 06-Сен-11, 14:27  [смотреть все]
Форумы | Темы | Пред. тема | След. тема



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру