Hi Guys

I have the following config file for nfacctd:

daemonize: true
plugin_buffer_size: 4024
nfacctd_time_new: true

aggregate[all]: proto,sum_host,sum_port
aggregate[db_in]: proto,src_host,dst_host,src_port,dst_port
aggregate[db_out]: proto,src_host,dst_host,src_port,dst_port
aggregate_filter[db_in]: dst net 10.10.0.0/15
aggregate_filter[db_out]: src net 10.10.0.0/15
plugins: memory[all], pgsql[db_in], pgsql[db_out]
sql_table[db_in]: acctin
sql_table[db_out]: acctout

sql_db: saaas
sql_table_version: 4
sql_user: pmacct
sql_refresh_time: 10m
sql_history: 24h
sql_history_roundoff: h
sql_optimize_clauses: true


And I am currently running less than 512k of traffic through this router from 
1500 clients going to the internet.

My PostgreSQL server is a separate machine (Opteron, 2Gb ram, single SATA 
disk) and constantly has the a process list like the following:

 3184 ?        R      0:14  \_ postgres: pmacct saaas 192.168.254.4(19172) 
UPDATE
 3188 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(19176) 
LOCK TABLE waiting
 3192 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(19180) 
LOCK TABLE waiting
 3210 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26429) 
LOCK TABLE waiting
 3212 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26431) 
LOCK TABLE waiting
 3217 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26435) 
LOCK TABLE waiting
 3220 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26438) 
LOCK TABLE waiting
 3227 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26444) 
LOCK TABLE waiting
 3232 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26449) 
LOCK TABLE waiting
 3237 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26454) 
LOCK TABLE waiting
 3243 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26458) 
LOCK TABLE waiting
 3253 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26467) 
LOCK TABLE waiting
 3257 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26471) 
LOCK TABLE waiting
 3285 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26476) 
LOCK TABLE waiting
 3292 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17487) 
LOCK TABLE waiting
 3297 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17492) 
LOCK TABLE waiting
 3301 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17495) 
LOCK TABLE waiting
 3303 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17497) 
LOCK TABLE waiting
 3309 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17503) 
LOCK TABLE waiting
 3313 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17506) 
LOCK TABLE waiting
 3317 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17509) 
LOCK TABLE waiting
 3325 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17515) 
LOCK TABLE waiting
 3328 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17518) 
LOCK TABLE waiting
 3331 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17521) 
LOCK TABLE waiting
 3338 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17527) 
LOCK TABLE waiting
 3347 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20426) 
LOCK TABLE waiting
 3358 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20436) 
LOCK TABLE waiting
 3362 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20440) 
LOCK TABLE waiting
 3373 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20450) 
LOCK TABLE waiting
 3377 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20454) 
LOCK TABLE waiting
 3392 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20466) 
LOCK TABLE waiting
 3394 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20468) 
LOCK TABLE waiting
 3400 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20473) 
LOCK TABLE waiting
 3406 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20479) 
LOCK TABLE waiting
 3411 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20483) 
LOCK TABLE waiting
 3417 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7563) LOCK 
TABLE waiting
 3421 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7567) LOCK 
TABLE waiting
 3428 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7573) LOCK 
TABLE waiting
 3431 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7576) LOCK 
TABLE waiting
 3438 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7582) LOCK 
TABLE waiting
 3442 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7586) LOCK 
TABLE waiting
 3457 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7598) LOCK 
TABLE waiting
 3459 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7600) LOCK 
TABLE waiting
 3463 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7604) LOCK 
TABLE waiting
 3476 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7616) LOCK 
TABLE waiting
 3509 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17261) 
LOCK TABLE waiting
 3520 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17272) 
LOCK TABLE waiting
 3525 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17277) 
LOCK TABLE waiting
 3537 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17288) 
LOCK TABLE waiting
 3541 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17292) 
LOCK TABLE waiting
 3553 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17301) 
LOCK TABLE waiting
 3557 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17305) 
LOCK TABLE waiting
 3562 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(17309) 
LOCK TABLE waiting
 3572 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(13522) 
LOCK TABLE waiting
 3576 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(13525) 
LOCK TABLE waiting
 3580 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(13529) 
LOCK TABLE waiting
 3587 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(13535) 
LOCK TABLE waiting
 3597 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(13545) 
LOCK TABLE waiting
 3602 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(13549) 
LOCK TABLE waiting
 3606 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(13553) 
LOCK TABLE waiting
 3614 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(13559) 
LOCK TABLE waiting
 3618 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(13563) 
LOCK TABLE waiting
 3623 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(13568) 
LOCK TABLE waiting
 3628 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(13572) 
LOCK TABLE waiting
 3630 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(13574) 
LOCK TABLE waiting
 3651 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(11749) 
LOCK TABLE waiting
 3653 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(11751) 
LOCK TABLE waiting
 3658 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(11755) 
LOCK TABLE waiting
 3669 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(11765) 
LOCK TABLE waiting
 3673 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(11769) 
LOCK TABLE waiting
 3685 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(11778) 
LOCK TABLE waiting
 3688 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(11781) 
LOCK TABLE waiting
 3694 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(11787) 
LOCK TABLE waiting
 3734 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(11792) 
LOCK TABLE waiting
 3742 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(1536) LOCK 
TABLE waiting
 3744 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(1538) LOCK 
TABLE waiting
 3752 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(1546) LOCK 
TABLE waiting
 3758 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(1551) LOCK 
TABLE waiting
 3763 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(1556) LOCK 
TABLE waiting
 3770 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(1562) LOCK 
TABLE waiting
 3774 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(1565) LOCK 
TABLE waiting
 3780 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(1570) LOCK 
TABLE waiting
 3787 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(1576) LOCK 
TABLE waiting
 3793 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(1582) LOCK 
TABLE waiting
 3798 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(1586) LOCK 
TABLE waiting
 3808 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(4089) LOCK 
TABLE waiting
 3813 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(4094) LOCK 
TABLE waiting
 3819 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(4099) LOCK 
TABLE waiting
 3825 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(4105) LOCK 
TABLE waiting
 3830 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(4109) LOCK 
TABLE waiting
 3836 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(4115) LOCK 
TABLE waiting
 3839 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(4118) LOCK 
TABLE waiting
 3846 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(4123) LOCK 
TABLE waiting
 3857 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(4132) LOCK 
TABLE waiting
 3861 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(4136) LOCK 
TABLE waiting
 3866 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(4141) LOCK 
TABLE waiting
 3873 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(25591) 
LOCK TABLE waiting
 3879 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(25597) 
LOCK TABLE waiting
 3887 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(25604) 
LOCK TABLE waiting
 3891 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(25608) 
LOCK TABLE waiting
 3898 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(25614) 
LOCK TABLE waiting
 3909 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(25623) 
LOCK TABLE waiting
 3913 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(25627) 
LOCK TABLE waiting
 3918 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(25631) 
LOCK TABLE waiting
 3930 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(25642) 
LOCK TABLE waiting
 3964 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(23463) 
LOCK TABLE waiting
 3970 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(23469) 
LOCK TABLE waiting
 3979 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(23477) 
LOCK TABLE waiting
 3981 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(23479) 
LOCK TABLE waiting
 3992 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(23489) 
LOCK TABLE waiting
 3995 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(23492) 
LOCK TABLE waiting
 4007 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(23501) 
LOCK TABLE waiting
 4010 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(23503) 
LOCK TABLE waiting
 4017 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(23510) 
LOCK TABLE waiting
 4030 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(22353) 
LOCK TABLE waiting
 4033 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(22356) 
LOCK TABLE waiting
 4036 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(22359) 
LOCK TABLE waiting
 4045 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(22367) 
LOCK TABLE waiting
 4049 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(22370) 
LOCK TABLE waiting
 4053 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(22373) 
LOCK TABLE waiting
 4057 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(22376) 
LOCK TABLE waiting
 4062 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(22381) 
LOCK TABLE waiting
 4073 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(22386) 
LOCK TABLE waiting
 4078 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5926) LOCK 
TABLE waiting
 4083 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5932) LOCK 
TABLE waiting
 4088 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5936) LOCK 
TABLE waiting
 4092 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5940) LOCK 
TABLE waiting
 4096 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5943) LOCK 
TABLE waiting
 4099 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5946) LOCK 
TABLE waiting
 4100 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5947) LOCK 
TABLE waiting
 4104 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5950) LOCK 
TABLE waiting
 4106 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5952) LOCK 
TABLE waiting
 4111 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5955) LOCK 
TABLE waiting
 4115 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5959) LOCK 
TABLE waiting
 4124 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5966) LOCK 
TABLE waiting
 4153 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5043) LOCK 
TABLE waiting
 4159 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5048) LOCK 
TABLE waiting
 4162 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5051) LOCK 
TABLE waiting
 4164 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5053) LOCK 
TABLE waiting
 4170 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5058) LOCK 
TABLE waiting
 4174 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5062) LOCK 
TABLE waiting
 4182 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5069) LOCK 
TABLE waiting
 4186 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5073) LOCK 
TABLE waiting
 4194 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5079) LOCK 
TABLE waiting
 4200 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5083) LOCK 
TABLE waiting
 4206 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5089) LOCK 
TABLE waiting
 4210 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5093) LOCK 
TABLE waiting
 4223 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(21800) 
LOCK TABLE waiting
 4226 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(21803) 
LOCK TABLE waiting
 4234 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(21810) 
LOCK TABLE waiting
 4237 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(21813) 
LOCK TABLE waiting
 4242 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(21818) 
LOCK TABLE waiting
 4249 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(21824) 
LOCK TABLE waiting
 4255 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(21830) 
LOCK TABLE waiting
 4261 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(21835) 
LOCK TABLE waiting
 4265 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(21838) 
LOCK TABLE waiting
 4271 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(21843) 
LOCK TABLE waiting
 4276 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(21847) 
LOCK TABLE waiting
 4282 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(21921) 
LOCK TABLE waiting
 4288 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5420) LOCK 
TABLE waiting
 4291 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5423) LOCK 
TABLE waiting
 4294 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5426) LOCK 
TABLE waiting
 4301 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5433) LOCK 
TABLE waiting
 4305 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5437) LOCK 
TABLE waiting
 4312 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5443) LOCK 
TABLE waiting
 4317 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5448) LOCK 
TABLE waiting
 4321 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5452) LOCK 
TABLE waiting
 4327 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5456) LOCK 
TABLE waiting
 4333 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5461) LOCK 
TABLE waiting
 4337 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5465) LOCK 
TABLE waiting
 4377 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(28009) 
LOCK TABLE waiting
 4382 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(28020) 
LOCK TABLE waiting
 4390 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(28028) 
LOCK TABLE waiting
 4396 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(28033) 
LOCK TABLE waiting
 4406 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(28042) 
LOCK TABLE waiting
 4410 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(28046) 
LOCK TABLE waiting
 4418 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(28052) 
LOCK TABLE waiting
 4422 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(28055) 
LOCK TABLE waiting
 4427 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(28060) 
LOCK TABLE waiting
 4434 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(28066) 
LOCK TABLE waiting
 4439 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7764) LOCK 
TABLE waiting
 4444 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7768) LOCK 
TABLE waiting
 4456 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7779) LOCK 
TABLE waiting
 4460 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7783) LOCK 
TABLE waiting
 4469 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7791) LOCK 
TABLE waiting
 4473 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7795) LOCK 
TABLE waiting
 4480 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7801) LOCK 
TABLE waiting
 4485 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7804) LOCK 
TABLE waiting
 4492 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7810) LOCK 
TABLE waiting
 4499 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7816) LOCK 
TABLE waiting
 4510 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(14396) 
LOCK TABLE waiting
 4512 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(14398) 
LOCK TABLE waiting
 4519 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(14404) 
LOCK TABLE waiting
 4523 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(14408) 
LOCK TABLE waiting
 4530 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(14414) 
LOCK TABLE waiting
 4534 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(14418) 
LOCK TABLE waiting
 4543 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(14426) 
LOCK TABLE waiting
 4552 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(14434) 
LOCK TABLE waiting
 4561 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(14441) 
LOCK TABLE waiting
 4571 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(14449) 
LOCK TABLE waiting
 4613 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(15224) 
LOCK TABLE waiting
 4620 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(15230) 
LOCK TABLE waiting
 4629 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(15239) 
LOCK TABLE waiting
 4637 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(15246) 
LOCK TABLE waiting
 4667 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(15253) 
LOCK TABLE waiting
 4679 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(15262) 
LOCK TABLE waiting
 4688 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(15270) 
LOCK TABLE waiting
 4704 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5676) LOCK 
TABLE waiting
 4711 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5682) LOCK 
TABLE waiting
 4722 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5692) LOCK 
TABLE waiting
 4727 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5697) LOCK 
TABLE waiting
 4732 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5701) LOCK 
TABLE waiting
 4762 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5708) LOCK 
TABLE waiting
 4780 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5722) LOCK 
TABLE waiting
 4786 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26645) 
LOCK TABLE waiting
 4795 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26653) 
LOCK TABLE waiting
 4802 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26659) 
LOCK TABLE waiting
 4810 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26667) 
LOCK TABLE waiting
 4819 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26675) 
LOCK TABLE waiting
 4826 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26682) 
LOCK TABLE waiting
 4837 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26690) 
LOCK TABLE waiting
 4846 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26698) 
LOCK TABLE waiting
 4883 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(24480) 
LOCK TABLE waiting
 4891 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(24487) 
LOCK TABLE waiting
 4899 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(24495) 
LOCK TABLE waiting
 4906 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(24501) 
LOCK TABLE waiting
 4914 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(24507) 
LOCK TABLE waiting
 4922 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(24515) 
LOCK TABLE waiting
 4934 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(24523) 
LOCK TABLE waiting
 4948 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(18200) 
LOCK TABLE waiting
 4956 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(18206) 
LOCK TABLE waiting
 4966 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(18216) 
LOCK TABLE waiting
 4972 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(18221) 
LOCK TABLE waiting
 4985 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(18233) 
LOCK TABLE waiting
 4989 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(18237) 
LOCK TABLE waiting
 4998 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(18243) 
LOCK TABLE waiting
 5006 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(18250) 
LOCK TABLE waiting
 5022 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(18514) 
LOCK TABLE waiting
 5029 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(18521) 
LOCK TABLE waiting
 5038 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(18529) 
LOCK TABLE waiting
 5046 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(18536) 
LOCK TABLE waiting
 5053 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(18543) 
LOCK TABLE waiting
 5061 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(18550) 
LOCK TABLE waiting
 5074 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(18560) 
LOCK TABLE waiting
 5085 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(18566) 
LOCK TABLE waiting
 5119 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5802) LOCK 
TABLE waiting
 5124 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5807) LOCK 
TABLE waiting
 5133 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5815) LOCK 
TABLE waiting
 5142 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5823) LOCK 
TABLE waiting
 5148 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5829) LOCK 
TABLE waiting
 5157 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5836) LOCK 
TABLE waiting
 5166 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5844) LOCK 
TABLE waiting
 5174 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5851) LOCK 
TABLE waiting
 5189 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(6706) LOCK 
TABLE waiting
 5195 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(6712) LOCK 
TABLE waiting
 5206 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(6722) LOCK 
TABLE waiting
 5213 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(6729) LOCK 
TABLE waiting
 5220 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(6735) LOCK 
TABLE waiting
 5238 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(6750) LOCK 
TABLE waiting
 5246 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(6757) LOCK 
TABLE waiting
 5263 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26327) 
LOCK TABLE waiting
 5266 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26330) 
LOCK TABLE waiting
 5277 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26340) 
LOCK TABLE waiting
 5286 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26348) 
LOCK TABLE waiting
 5300 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(26359) 
LOCK TABLE waiting
 5336 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7298) LOCK 
TABLE waiting
 5342 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7303) LOCK 
TABLE waiting
 5350 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7310) LOCK 
TABLE waiting
 5379 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7316) LOCK 
TABLE waiting
 5415 ?        S      0:01  \_ postgres: peter saaas 81.214.255.57(23998) idle
 5423 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7331) LOCK 
TABLE waiting
 5432 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7337) LOCK 
TABLE waiting
 5440 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(7344) LOCK 
TABLE waiting
 5452 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20837) 
LOCK TABLE waiting
 5456 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20840) 
LOCK TABLE waiting
 5461 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20844) 
LOCK TABLE waiting
 5465 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20848) 
LOCK TABLE waiting
 5470 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20853) 
LOCK TABLE waiting
 5491 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20859) 
LOCK TABLE waiting
 5494 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20861) 
LOCK TABLE waiting
 5499 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20865) 
LOCK TABLE waiting
 5504 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20870) 
LOCK TABLE waiting
 5516 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20879) 
LOCK TABLE waiting
 5519 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20882) 
LOCK TABLE waiting
 5521 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20884) 
LOCK TABLE waiting
 5525 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(20888) 
LOCK TABLE waiting
 5537 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5568) LOCK 
TABLE waiting
 5541 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5572) LOCK 
TABLE waiting
 5552 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5581) LOCK 
TABLE waiting
 5556 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5610) LOCK 
TABLE waiting
 5560 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5645) LOCK 
TABLE waiting
 5568 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5715) LOCK 
TABLE waiting
 5571 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5740) LOCK 
TABLE waiting
 5575 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5768) LOCK 
TABLE waiting
 5581 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5818) LOCK 
TABLE waiting
 5586 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5863) LOCK 
TABLE waiting
 5625 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(5938) LOCK 
TABLE waiting
 5628 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(9919) LOCK 
TABLE waiting
 5635 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(9924) LOCK 
TABLE waiting
 5640 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(9929) LOCK 
TABLE waiting
 5647 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(9935) LOCK 
TABLE waiting
 5649 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(9937) LOCK 
TABLE waiting
 5656 ?        S      0:00  \_ postgres: pmacct saaas 192.168.254.4(9943) LOCK 
TABLE waiting

Top gives the following:

top - 15:00:45 up 23 days, 20:54,  5 users,  load average: 1.06, 0.98, 1.20
Tasks: 119 total,   3 running, 116 sleeping,   0 stopped,   0 zombie
Cpu(s): 99.7% us,  0.3% sy,  0.0% ni,  0.0% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:   2057472k total,  1606244k used,   451228k free,    42136k buffers
Swap:  1012052k total,     3292k used,  1008760k free,  1339692k cached

As you can see the machine is not waiting on disk, but rather on the locks. 
Before I go about trying to optimise this any further, is there something 
basic I have wrong that can speed this up?

-- 

Peter Nixon
http://www.peternixon.net/
PGP Key: http://www.peternixon.net/public.asc

Attachment: pgpAGQpRp59g6.pgp
Description: PGP signature

_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

Reply via email to