Re: [PERFORM] Postgress is taking lot of CPU on our embedded hardware.

2012-01-28 Thread Mark Kirkwood
If you can batch the inserts into groups (of say 10 to 100) it might help performance - i.e: Instead of INSERT INTO table VALUES(...); INSERT INTO table VALUES(...); ... INSERT INTO table VALUES(...); do INSERT INTO table VALUES(...),(...),...,(...); This reduces the actual number of INSERT

Re: [PERFORM] Postgress is taking lot of CPU on our embedded hardware.

2012-01-28 Thread Claudio Freire
On Sat, Jan 28, 2012 at 2:21 PM, Jayashankar K B wrote: > > ./configure > CC=/opt/freescale/usr/local/gcc-4.4.54-eglibc-2.10.54/m68k-linux/bin/m68k-linux-gnu-gcc > CFLAGS='-fmessage-length=0 -fpack-struct -mcpu=54418 -msoft-float' > --host=i686-pc-linux-gnu --target=m68k-linux-gnu > --prefix=/

Re: [PERFORM] Postgress is taking lot of CPU on our embedded hardware.

2012-01-28 Thread Jeff Janes
On Fri, Jan 27, 2012 at 10:30 AM, Jayashankar K B wrote: > Hi Heikki Linnakangas: We are using series of Insert statements to insert the > records into database. > Sending data in binary is not an option as the module that writes into DB has > been finalized. > We do not have control over that.

Re: [PERFORM] Postgress is taking lot of CPU on our embedded hardware.

2012-01-28 Thread Deron
Hello, One thing you may look at are the index and constraints on the relations. If you have multiple constraints or index this may add CPU time on each insert. You may try to drop the index, do a bulk load, and then recreate the index. This may (or may not) reduce the total time / CPU but it

Re: [PERFORM] Postgress is taking lot of CPU on our embedded hardware.

2012-01-28 Thread Jayashankar K B
Hi, I downloaded the source code and cross compiled it into a relocatable package and copied it to the device. LTIB was the cross-compile tool chain that was used. Controller is coldfire MCF54418 CPU. Here is the configure options I used. ./configure CC=/opt/freescale/usr/local/gcc-4.4.54-egl

Re: [PERFORM] Postgress is taking lot of CPU on our embedded hardware.

2012-01-28 Thread Jayashankar K B
Hi, The number of inserts into the database would be a minimum of 3000 records in one operation.. We do not have any stringent requirement of writing speed. So we could make do with a slower write speed as long as the CPU usage is not heavy... :) We will try reducing the priority and check once.