This one time, at band camp, Sven Anderson wrote: >Hi, > >i'm just testing pmacct on OpenBSD 3.7. First I used MySQL as data >backend. Even after several days of capturing into the same table I had no >performance problems. But since the MySQL backend uses a string for >"ip_proto" and has no IP address type I decided to switch to PostgreSQL. > >But now I have massive performance problems. After one day, when there are > 500 000 to 700 000 rows in the table, it's getting so slow, that it >cannot store the data fast enough any more, resulting in a lot of >processes like > >22758 ?? I 0:00.00 pmacctd: PostgreSQL Plugin -- DB Writer >[default] (pmacctd) > >and > >20427 ?? I 0:00.03 postmaster: pmacct pmacct [local] LOCK TABLE >waiting (postgres) > >Is there a tuning problem, or is PostgreSQL known to be not as fast as >MySQL? I thought, maybe there are some kind of rollback journals written, >which MySQL doesn't, or the hash-tables are not indexed correctly? Any ideas?
What version of pmacct are you using? 0.10.0 has patches to remove the LOCK TABLE if you're in insert-only mode, which I recommend. I also remove the index from the table to speed up the inserts, and partition the data into a new table per day so that each table never grows too big to manage. _______________________________________________ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
