Re: How to improve JDBC performance
Mark Matthews <[email protected]> Thu, 08 May 2014 16:10:07 -0500
| Newsgroups | gmane.comp.db.mysql.java |
|---|---|
| Message-ID | <[email protected]> |
On 05/08/2014 07:01 AM, fuyou wrote: > hi all > > My program insert some data to MySQL Server,becasue some reason ,can't > batch insert. > In my benchmarks,the bottleneck is jdbc,how to improve performance? > see the jstack > > > > "recvMsgWorkTPConfig-11-thread-20" prio=10 tid=0x00002aaac0445000 > nid=0x399b runnable [0x000000004af94000] > java.lang.Thread.State: RUNNABLE > at java.util.zip.CRC32.updateBytes(Native Method) > at java.util.zip.CRC32.update(CRC32.java:74) > //omission ... > "recvMsgWorkTPConfig-11-thread-6" prio=10 tid=0x000000000bcc4000 nid=0x3987 > runnable [0x0000000049b7f000] > java.lang.Thread.State: RUNNABLE > at java.net.SocketInputStream.socketRead0(Native Method) > at java.net.SocketInputStream.read(SocketInputStream.java:152) > at java.net.SocketInputStream.read(SocketInputStream.java:122) > > Hi, I'm assuming that's from the driver, I can't tell because the stack has been cut off. If so, that's network latency, which is time, not cpu-based. Only way to make that better if mysqld is configured to do i/o as fast as it can (a topic for [email protected]), is to batch to cut down on round-trips, so you'll have to get that working. -Mark -- Mark Matthews <[email protected]> Consulting Member, Technical Staff - MySQL Enterprise Tools @ Oracle -- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe: http://lists.mysql.com/java