Hallo,
wir haben heute Umstellung und die DB ist sakrig langsam.
Reindezierung hat nix gebracht. Was bei uns 1,5 sekunden dauert, dauert beim Kunden > 1 minute...
Wenn ich folgendes eingebe:
sehe ich folgendes:Code:select procpid, datname, client_addr, substring(current_query,1,63) from pg_stat_activity;
Ich habe die DB neu gestartet, das hatte erst mal nix gebracht...Code:...substring... <IDLE> in transaction (22 mal) <IDLE> (7 mal) declare "SQL_CUR05xxx" cursor with hold for SELECT... (15 mal) BEGIN;declare "SQL_CUR05xxx" scroll cursor for SELECT... (2 mal) declare "SQL_CUR05xxx" scroll cursor for SELECT... (5 mal)
Was genau heißt "Umstellung"?
Die Ausgabe ist erst mal nicht aussagekräftig. Blockiert da irgendetwas? Wie sieht der Systemload aus?
Xandrian: Kurz gesagt: Du hast ein falsches Konzept und willst nicht auf ads hören
Jetzt NEU: PostgreSQL - Datenbankpraxis für Anwender, Administratoren und Entwickler
PostgreSQL Service & Support
Kunde hatte vorhere nacravision Warenwirtschaft und jetzt/heute unsere...
Wie sehe ich blockaden?
Wie sehe ich systemload? mit TOP?
TOP:
Code:top - 10:36:59 up 25 days, 17:41, 7 users, load average: 1.00, 0.69, 1.55 Tasks: 323 total, 2 running, 320 sleeping, 1 stopped, 0 zombie Cpu(s): 8.4%us, 0.1%sy, 0.0%ni, 91.3%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 32172M total, 15199M used, 16972M free, 465M buffers Swap: 2055M total, 0M used, 2055M free, 13610M cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 31624 postgres 20 0 8282m 282m 244m R 100 0.9 3:23.88 postmaster 26572 root 20 0 787m 316m 25m S 18 1.0 180:37.73 plasma-desktop 31550 postgres 20 0 8266m 230m 208m S 14 0.7 0:31.42 postmaster 32032 root 20 0 8664 1336 848 R 0 0.0 0:00.03 top 1 root 20 0 8072 760 628 S 0 0.0 0:12.09 init 2 root 15 -5 0 0 0 S 0 0.0 0:00.01 kthreadd 3 root RT -5 0 0 0 S 0 0.0 0:00.00 migration/0 4 root 15 -5 0 0 0 S 0 0.0 0:15.16 ksoftirqd/0 5 root RT -5 0 0 0 S 0 0.0 0:00.00 watchdog/0 6 root RT -5 0 0 0 S 0 0.0 0:00.00 migration/1 7 root 15 -5 0 0 0 S 0 0.0 0:10.53 ksoftirqd/1 8 root RT -5 0 0 0 S 0 0.0 0:00.00 watchdog/1 9 root RT -5 0 0 0 S 0 0.0 0:00.00 migration/2 10 root 15 -5 0 0 0 S 0 0.0 0:04.97 ksoftirqd/2 11 root RT -5 0 0 0 S 0 0.0 0:00.00 watchdog/2 12 root RT -5 0 0 0 S 0 0.0 0:00.01 migration/3
Der Befehl: "w |head -1"
ergibt: 10:38:36 up 25 days, 17:42, 7 users, load average: 1.15, 0.82, 1.51
Geändert von ipConfig (01.03.2010 um 11:38 Uhr)
Blockierte Prozesse haben ein 't' in der "waiting" Spalte in "pg_stat_activity".
Deine DB lastet diesen Server zu 100% aus, wenn das ein Single-Core ist. Load ist 1.00.
Xandrian: Kurz gesagt: Du hast ein falsches Konzept und willst nicht auf ads hören
Jetzt NEU: PostgreSQL - Datenbankpraxis für Anwender, Administratoren und Entwickler
PostgreSQL Service & Support
select procpid, datname, client_addr, waiting, substring(current_query,1,63) from pg_stat_activity:
Code:31477;"postgres" ;"140.100.100.253";f;"<IDLE>" 31478;"mo_koenig";"140.100.100.253";f;"<IDLE>" 31480;"mo_koenig";"140.100.100.253";f;"<IDLE>" 31563;"mo_koenig";"140.100.100.252";f;"<IDLE> in transaction" 31583;"mo_koenig";"140.100.100.252";f;"<IDLE> in transaction" 31550;"mo_koenig";"140.100.100.252";f;"<IDLE>" 31566;"mo_koenig";"140.100.100.252";f;"<IDLE> in transaction" 31768;"mo_koenig";"140.100.100.252";f;"declare "SQL_CUR0D9F6590" cursor with hold for SELECT IntToChar" 31675;"mo_koenig";"140.100.100.252";f;"<IDLE> in transaction" 32172;"mo_koenig";"140.100.100.252";f;"<IDLE> in transaction" 32207;"mo_koenig";"140.100.100.252";f;"<IDLE> in transaction" 31649;"mo_koenig";"140.100.100.252";f;"<IDLE> in transaction" 31696;"mo_koenig";"140.100.100.252";f;"<IDLE> in transaction" 31805;"mo_koenig";"140.100.100.252";f;"<IDLE> in transaction" 31690;"mo_koenig";"140.100.100.252";f;"<IDLE> in transaction" 32044;"mo_koenig";"140.100.100.252";f;"<IDLE> in transaction" 31708;"mo_koenig";"140.100.100.252";f;"<IDLE> in transaction" 31719;"mo_koenig";"140.100.100.252";f;"<IDLE> in transaction" 31818;"mo_koenig";"140.100.100.252";f;"declare "SQL_CUR05DA1D50" cursor with hold for SELECT IntToChar" 31875;"mo_koenig";"140.100.100.252";f;"<IDLE> in transaction" 31956;"mo_koenig";"140.100.100.252";f;"<IDLE> in transaction" 32167;"mo_koenig";"140.100.100.252";f;"declare "SQL_CUR05FEAAD0" cursor with hold for SELECT IntToChar" 32248;"postgres" ;"192.168.44.223" ;f;"<IDLE>" 32219;"mo_koenig";"140.100.100.252";f;"<IDLE> in transaction" 32249;"test" ;"192.168.44.223" ;f;"<IDLE>" 32252;"mo_koenig";"140.100.100.252";f;"<IDLE> in transaction" 32258;"test" ;"192.168.44.223" ;f;"select procpid, datname, client_addr, waiting, substring(curren"
--
https://www.xing.com/profile/Andreas_Kretschmer7ads Das hatte dir akretschmer gestern schon gesagt und siehe da sobald du das machst, funktioniert es ;-)
--
https://www.xing.com/profile/Andreas_Kretschmer7ads Das hatte dir akretschmer gestern schon gesagt und siehe da sobald du das machst, funktioniert es ;-)
--
https://www.xing.com/profile/Andreas_Kretschmer7ads Das hatte dir akretschmer gestern schon gesagt und siehe da sobald du das machst, funktioniert es ;-)
An sich sind die Verbindungen alle mit nichts tun beschäftigt. Jedenfalls macht keine von denen sonderlich viel.
Also womit genau beschäftigt sich deine Datenbank? log_min_duration_statement hochsetzen! Auf irgendwas um die 500 (Millisekunden). Dann das Logfile beobachten.
Und das nächste Mal vorab testen ;-)
Xandrian: Kurz gesagt: Du hast ein falsches Konzept und willst nicht auf ads hören
Jetzt NEU: PostgreSQL - Datenbankpraxis für Anwender, Administratoren und Entwickler
PostgreSQL Service & Support
Nicht sonderlich viel?Code:31624 postgres 20 0 8282m 282m 244m R 100 0.9 3:23.88 postmaster
3 mal ACK.Also womit genau beschäftigt sich deine Datenbank? log_min_duration_statement hochsetzen! Auf irgendwas um die 500 (Millisekunden). Dann das Logfile beobachten.
Und das nächste Mal vorab testen ;-)
Andreas
--
https://www.xing.com/profile/Andreas_Kretschmer7ads Das hatte dir akretschmer gestern schon gesagt und siehe da sobald du das machst, funktioniert es ;-)
Links: Tobias Bauer - IT- und Funkdienstleistungen - Bilderrahmen-kaufen.de - Der Onlineshop für Bilderrahmen & Fotorahmen - Funkforum
Lesezeichen