10 inserts a sec into redhat box

10 inserts a sec into redhat box

am 05.11.2009 12:57:47 von Sydney Puente

--0-1397406693-1257422267=:11008
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hello, I am currently inserting about 10 rows (2 varchar 50 fields ) a=
sec into modern 4 processor RH 5.x box using=0Aperl Net::Mysql from anoth=
er box of similar spec. =0AThis is rather less than expected. I suspect I c=
ould push the inserts from the source box much faster than that. And =
that it is the target box that is the problem. Top reveals it has a load av=
erage of 2 to 3. How can I look into this performance problem? TI=
A Syd =0A
--0-1397406693-1257422267=:11008--

Re: 10 inserts a sec into redhat box

am 05.11.2009 16:59:00 von rajlist

Sydney Puente yahoo.com> writes:

>
> I am currently inserting about 10 rows (2 varchar 50 fields ) a sec into
modern 4 processor RH 5.x box using
> perl Net::Mysql from another box of similar spec.
> This is rather less than expected. I suspect I could push the inserts from
the source box much faster than that.

What table type are you inserting into? If it is an older version of innodb and
you have an autoinc key, you might be running into the global autoinc lock issue
(bug?)

Another option is to have multiple threads doing the inserts.

>
> And that it is the target box that is the problem. Top reveals it has a load
average of 2 to 3.

What about your iostat figures? Are you bound by your disk i/o?





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: 10 inserts a sec into redhat box

am 05.11.2009 17:04:18 von mos

At 05:57 AM 11/5/2009, you wrote:
>Hello, I am currently inserting about 10 rows (2 varchar 50 fields ) a sec
>into modern 4 processor RH 5.x box using perl Net::Mysql from another box
>of similar spec. This is rather less than expected. I suspect I
>could push the inserts from the source box much faster than that. And
>that it is the target box that is the problem. Top reveals it has a load
>average of 2 to 3. How can I look into this performance problem? TIA Syd

You should be getting inserts much faster than that. Is the machine disk
bound or CPU bound?

Are you using InnoDb or MyISAM tables? If you run the same test on the same
machine as the MySQL server, how fast is it then? If it is much faster then
the problem is likely your network and you'll need to monitor the network
bandwidth. It could be a faulty NIC or cable.

If it is the same speed on the server box then the problem is with your
database. You can of course insert multiple lines with one Insert statement
(see manual) or use a Load Data Infile to load the data from a CSV file.
How many indexes does the table have and how many rows are in the table?
The more indexes then the slower the inserts. You could post your update
SQL statement and the table structure.



Mike


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org