On Sun, 18 Oct 2015 12:43, Per Jessen <per@...> wrote:
Andrei Borzenkov wrote:
18.10.2015 12:20, Brandon Vincent пишет:
On Sun, Oct 18, 2015 at 2:16 AM, Per Jessen <per@computer.org> wrote: .... The situation I have is as follows:
I have a 600Gb filesystem mounted on /var - key directories under /var are:
/var/spool/postfix-in/{incoming,active} with 2 levels of hashing. On a busy day or after delays, each subdir might easily reach 10.000 files. 99% small files of less than 100Kb. (emails).
/var/spool/elsewhere/dir{0,1,2,3...1000}/maildirs - each such maildir might have 100.000 files.
I am in the process of migrating some of the <elsewhere> directories to other systems using rsync. This typically causes a major slowdown, which results in large postfix queues building, ending up in processing delays of up to 24hours, sometimes more.
When the system is not slowed down, it will easily put away 100.000 new emails per hour. I have been looking at adjusting vfs_cache_pressure, but I haven't found any good/better values.
@Per, have you looked at "ionice", esp running rsync with ionice? That should reduce the impact that running rsync has on postfix queues. Short: "ionice -c3 <rysnc-cmd>" for idle-class or "ionice -c2 -n7 <rysnc-cmd>" for best-effort-class with lowest priority. Maybe you will have to set io-priority of postfix manually to get good or at least better results. "ionice -c2 -n1 -p <postfix-process-ids-septerated-by-space>" to give the postfix processes best-effort-class with second highest priority. AFAIKT, io-priority defaults to best-effort-class with level 4 priority. Have a nice sunday, - Yamaban.