Re: postmaster has high CPU (system) utilization
От | Martijn van Oosterhout |
---|---|
Тема | Re: postmaster has high CPU (system) utilization |
Дата | |
Msg-id | 20030324011624.GC24823@svana.org обсуждение исходный текст |
Ответ на | postmaster has high CPU (system) utilization (Trevor Bylsma <tbylsma@atreus-systems.com>) |
Список | pgsql-general |
On Mon, Mar 17, 2003 at 06:10:14PM -0500, Trevor Bylsma wrote: > What I am doing is, via a perl script, reading about 5000 records out of > the database and printing them to the screen. This process takes about > 5 minutes with postmaster hogging the CPU for the duration. > > What is odd is that if I then duplicate the same data on another box and > run the same script there the process takes less then 30 seconds to > complete. Postmaster will still hog the CPU, but it is 75% user level > load, rather than system level like it is on the problematic box. (Yes, > the 2 boxes are of equivalent horsepower and have the same version of > linux, postgreSQL, and perl installed) > > I should also mention that if I run the same query within psql I will > get all the results in about 4 seconds. Looks to me that it's not the postmaster doing it, but the process doing the printing. This is one process where a quality of your video card matter. Especially the scrolling is heavy on non-accelerated cards. The way to check this is to redirect the output to a file and see if the difference is still there. > Has anybody else run into this problem where postmaster seems to churn > in system level calls?? Any ideas on how to fix this issue ? Confirm the problem is where you think it is. One useful trick is to use strace -c. It will run your program and then give you an idea of which syscalls the time is spent on. You can use it on running processes to. -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > IT is not something like pizza that you order in at one o'clock in > the morning. - John Loebenstein, St George CIO
Вложения
В списке pgsql-general по дате отправления: