vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello Im using postgres 8.0.1 on Debian Sarge with 2 XEON 2.4 HT. doing cat /etc/cpuinfo shows that linux sees 4 cpu ( the HT effect ). I noticed that when im runing a big query only one of the CPUs become loaded. Is it normal behavior ? am i missing something ? Thanks -- -------------------------- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 Cel: 972-52-8555757 Fax: 972-4-6990098 http://www.canaan.net.il -------------------------- ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match |
| |||
| On Sun, Aug 07, 2005 at 01:04:51PM +0300, Michael Ben-Nes wrote: > Hello > > Im using postgres 8.0.1 on Debian Sarge with 2 XEON 2.4 HT. > > doing cat /etc/cpuinfo shows that linux sees 4 cpu ( the HT effect ). > > I noticed that when im runing a big query only one of the CPUs become > loaded. > > Is it normal behavior ? am i missing something ? Yep, PostgreSQL uses a single backend for each client, so if you want to use all four processors, you need to be running four queries simultaneously... Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQFC9d3xIB7bNG8LQkwRAurzAJ9NSFm2ugVgcu+1DGwgKL Ef6E9a1wCbBQi3 k1NmbN1XiydXmMGHRccO7jU= =3fNp -----END PGP SIGNATURE----- |
| |||
| Martijn van Oosterhout wrote: >On Sun, Aug 07, 2005 at 01:04:51PM +0300, Michael Ben-Nes wrote: > > >>Hello >> >>Im using postgres 8.0.1 on Debian Sarge with 2 XEON 2.4 HT. >> >>doing cat /etc/cpuinfo shows that linux sees 4 cpu ( the HT effect ). >> >>I noticed that when im runing a big query only one of the CPUs become >>loaded. >> >>Is it normal behavior ? am i missing something ? >> >> > >Yep, PostgreSQL uses a single backend for each client, so if you want >to use all four processors, you need to be running four queries >simultaneously... > > You mean select 1, select 2 & sleect 3 will run on the same cpu becouse they submited from the same PSQL session ? Or each select will be run in turn on the most idle cpu ? Is this true for all the other OS or just for Linux ? (Bsd, solaris... ) Thanks >Have a nice day, > > -- -------------------------- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 Cel: 972-52-8555757 Fax: 972-4-6990098 http://www.canaan.net.il -------------------------- ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |
| ||||
| On Sun, Aug 07, 2005 at 02:15:50PM +0300, Michael Ben-Nes wrote: > >Yep, PostgreSQL uses a single backend for each client, so if you want > >to use all four processors, you need to be running four queries > >simultaneously... > > > > > You mean select 1, select 2 & sleect 3 will run on the same cpu becouse > they submited from the same PSQL session ? > Or each select will be run in turn on the most idle cpu ? No, they are run in the same single process and run on one cpu. The OS can ofcourse shift it to whichever CPU it thinks is most appropriate. It can shift it in the middle of a query too, but that's not up to PostgreSQL. > Is this true for all the other OS or just for Linux ? (Bsd, solaris... ) A single client uses a single CPU at a time, but it's not tied to that particular CPU. That applies to all supported platforms... Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQFC9e8SIB7bNG8LQkwRAqPCAJ9iPX14yzy5u3cBsAb9gZ p3mwkX4wCgg6zW eNeLR5/8Rz4P9xIqFlIQwNI= =IVmn -----END PGP SIGNATURE----- |