[Linux-sunucu] PostgreSQL Bakim

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: Ethem Bilgin (ethem@pozitron.com)
Date: Tue 25 Oct 2005 - 20:50:43 EEST


Selam,

 

Bir internet sitesinde takribi 40.000 uye ile ugrasiyorum sistemin buyumesi ihtimalini goz onune alarak veri tabanını postgresql sectim ama performansindan hic memnun degilim.

 

10 15 gunde 4 GB lık bir dosya oluşturuyor ve sistem nerede ise calismaz hale geliyor ve yavasliyor. Her gece ayrica cron gorevi ile "VACUUM ANALYZE" calistiriyorum. Butun veritabanlarinin SQL dokumu 51MB tutuyor. Postgresql'e geri yukledigimde 550-600MB civari yer tutuyor.

 

Araştırınca reindex komutu ile sistemin baya kendine geldiğini gördüm bunu çalıştırınca dosya 700 mb lar mertebesine geldi. Her gece VACUUM ANALYZE'dan sonra REINDEX'i de Cron da bir gorev olarak olusturdum.

 

Reindexi crona yazdım ama mutlaka daha baska metodlar da vardır. Bu sistemi optimumda tutmam ve performansını arttirabilmem icin baska neler yapmamı onerirsiniz.

 

Sistem: Red Hat RHEL3

DB: rhdb (postgresql) 7.4.10

 

Postgresql.conf dan ayarlananlar

 

max_connections = 256

shared_buffers = 512

sort_mem = 65535

vacuum_mem = 32168

checkpoint_segments = 10

effective_cache_size = 60000

LC_MESSAGES = 'en_US.UTF-8'

LC_MONETARY = 'en_US.UTF-8'

LC_NUMERIC = 'en_US.UTF-8'

LC_TIME = 'en_US.UTF-8'

statement_timeout = 0

 

Hafiza Dokumu

 

             total used free shared buffers cached

Mem: 768912 742460 26452 0 169172 376264

-/+ buffers/cache: 197024 571888

Swap: 1052248 10384 1041864

 

Islemci

 

processor : 0

vendor_id : GenuineIntel

cpu family : 15

model : 2

model name : Intel(R) Xeon(TM) CPU 2.40GHz

stepping : 7

cpu MHz : 2400.139

cache size : 512 KB

fdiv_bug : no

hlt_bug : no

f00f_bug : no

coma_bug : no

fpu : yes

fpu_exception : yes

cpuid level : 2

wp : yes

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm

bogomips : 4784.12

 

Sistemde 32GB SCSI disk mevcut.

 

Ethem Bilgin

 

www.pozitron.com <file:///C:\Documents%20and%20Settings\ethem\Application%20Data\Microsoft\Signatures\www.pozitron.com>

mailto:ethem@pozitron.com

 

Tel: + 90 212 253 75 75

Faks: + 90 212 253 77 33

 

_______________________________________________
Linux-sunucu mailing list
Linux-sunucu@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-sunucu


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.