From: | Victor Yegorov <vyegorov(at)gmail(dot)com> |
---|---|
To: | "drum(dot)lucas(at)gmail(dot)com" <drum(dot)lucas(at)gmail(dot)com> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: [INFO] - vm.dirty_ratio/background_ratio |
Date: | 2016-04-05 05:58:49 |
Message-ID: | CAGnEboi83_TcZqJzuGcs6vFASSZ1EoN8m2Q8yXWWj466nOOEiA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
2016-04-05 2:27 GMT+03:00 drum(dot)lucas(at)gmail(dot)com <drum(dot)lucas(at)gmail(dot)com>:
> I've got a 128GB server with SATA disks.. and I'm having I/O issue....
> ...
>
>> [root(at)741293-03 ~]$ sysctl -a | grep dirty
>> vm.dirty_background_ratio = 20
>> vm.dirty_background_bytes = 0
>> vm.dirty_ratio = 25
>> vm.dirty_bytes = 0
>> vm.dirty_writeback_centisecs = 500
>> vm.dirty_expire_centisecs = 3000
>
>
I think you should lower your `dirty_background_ratio`, 'cos currently
kernel will start writing down dirty data from the cache when 20% of
`Active` (as reported by /proc/vmstat) is filled,
on 128GB server this can be a lot. You should base your settings on your IO
subsystem capabilities — somewhere around the size of the cache of your
RAID array.
If you really have IO issues, consider checking more kernel parameters:
sysctl -a|egrep '^vm.(dirty|swap|over)'
and also check `pg_stat_bgwriter` data, it shows accumulated data about IO
performed by checkpoints, bgwriter and individual backends.
For reference, I really like the following pages:
- http://www.westnet.com/~gsmith/content/linux-pdflush.htm
- http://www.westnet.com/~gsmith/content/postgresql/chkp-bgw-83.htm
-
http://careers.directi.com/display/tu/Understanding+and+optimizing+Memory+utilization
- http://careers.directi.com/display/tu/Understanding+and+Optimizing+Disk+IO
--
Victor Y. Yegorov
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Johansen | 2016-04-05 18:05:56 | Disk reads when using streaming replication? |
Previous Message | drum.lucas@gmail.com | 2016-04-04 23:27:25 | [INFO] - vm.dirty_ratio/background_ratio |