473,756 Members | 1,808 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Innodb slave Insert Performance

I have a master slave configuration on linux machines running MySQL 4.0.21.
Once every hour, a process deletes about 9000 rows and re-inserts fresh data
on the master. The master process completes processing under a minute. The
updates arrive on the slave within seconds. However, the slave takes about
15-20 minutes to post the same updates. Both master and slave have InnoDB
tables. The master and the slave are almost identical in capacity and MySQL
configuration. Can someone please suggest how I can improve insert
performance on the slave?

MY.CNF for the slave (slave has 2G main memory)

innodb_data_hom e_dir = /opt/mysql/var/
innodb_data_fil e_path = ibdata1:10M:aut oextend
innodb_log_grou p_home_dir = /opt/mysql/var/
innodb_log_arch _dir = /opt/mysql/var/
# You can set .._buffer_pool_ size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_p ool_size = 384M
innodb_addition al_mem_pool_siz e = 20M
# Set .._log_file_siz e to 25 % of buffer pool size
innodb_log_file _size = 64M
innodb_log_buff er_size = 8M
innodb_flush_lo g_at_trx_commit = 1
innodb_lock_wai t_timeout = 50
SHOW INNODB STATUS on the slave during slow inserts ...

=============== =============== =======
050629 11:03:47 INNODB MONITOR OUTPUT
=============== =============== =======
Per second averages calculated from the last 3 seconds
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 10461, signal count 8415
Mutex spin waits 81152, rounds 764297, OS waits 4380
RW-shared spins 10540, OS waits 3747; RW-excl spins 5325, OS waits 2326
------------
TRANSACTIONS
------------
Trx id counter 0 559241043
Purge done for trx's n:o < 0 559240805 undo n:o < 0 0
Total number of lock structs in row lock hash table 0
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0 0, not started, process no 32132, OS thread id 2594987
MySQL thread id 218508, query id 3860732 dumas 10.2.5.95 root
show innodb status
---TRANSACTION 0 559236492, not started, process no 29474, OS thread id
2250956
MySQL thread id 194334, query id 3846090 foster 10.25.2.16 apmstations
---TRANSACTION 0 559241041, not started, process no 11717, OS thread id
10251 flushing log
mysql tables in use 1, locked 1
MySQL thread id 3, query id 3860730 update
INSERT INTO tmp_ftr_coll VALUES ('/features/2005/06/15_kerre_krauss ',
'2005-06-15', 'Nicole Krauss writes &quot;The History of Love&quot; ',
'Nicole Krauss called her new novel &quot;The History of Love&quot;, but
it\'s much more than that. It\'s the story of a book that touches the lives
of people
--------
FILE I/O
--------
I/O thread 0 state: waiting for i/o request (insert buffer thread)
I/O thread 1 state: waiting for i/o request (log thread)
I/O thread 2 state: waiting for i/o request (read thread)
I/O thread 3 state: waiting for i/o request (write thread)
Pending normal aio reads: 0, aio writes: 0,
ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
Pending flushes (fsync) log: 1; buffer pool: 0
23402 OS file reads, 292534 OS file writes, 271730 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 20.99 writes/s, 20.99 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf for space 0: size 1, free list len 0, seg size 2,
295 inserts, 295 merged recs, 166 merges
Hash table size 1593833, used cells 342543, node heap has 379 buffer(s)
6070.64 hash searches/s, 1390.87 non-hash searches/s
---
LOG
---
Log sequence number 32 889573352
Log flushed up to 32 889573074
Last checkpoint at 32 887444884
1 pending log writes, 0 pending chkp writes
268194 log i/o's done, 20.99 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 462835244; in additional pool allocated 3130496
Buffer pool size 24576
Free buffers 2
Database pages 24195
Modified db pages 401
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages read 31551, created 101, written 62135
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
Buffer pool hit rate 1000 / 1000
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
Main thread process no. 11714, id 7176, state: sleeping
Number of rows inserted 264002, updated 607, deleted 263264, read 336331358
20.66 inserts/s, 0.00 updates/s, 77.97 deletes/s, 7001.67 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
=============== =============
Jul 23 '05 #1
0 2487

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3146
by: Vanchau Nguyen | last post by:
Hi all, Hoping someone can help us with this strange Innodb problem. At about 5:15 AM 2/2/04 (this morning), our slave server stopped accepting connections. The machine was pingable, but you could not SSH into the machine. We had to manually reboot the machine, and restart the slave. Looking in the error file we found this:
3
949
by: Andy Tran | last post by:
I built a system using mysql innodb to archive SMS messages but the innodb databases are not keeping up with the number of SMS messages coming in. I'm looking for performance of 200 msgs/sec where 1 msg is 1 database row. I'm running on Red Linux: 2.4.20-8bigmem #1 SMP Thu Mar 13 17:32:29 EST 2003 i686 i686 i386 GNU/Linux The machine has dual CPU and 2G of RAM.
0
1199
by: Kurt Tragant | last post by:
Hi List, I'd like to setup the following: Server A <-- Server B <-- Server C Data A some of Data A some of Data A Data B Data B Server A should be the master for server B. Server B should get not all but some of the data of server A. Additionally there should be
0
1314
by: Mike Chirico | last post by:
Hopefully the following will be useful or interesting: TIP 29: An example of using referential integrity with InnoDB tables. Referential Integrity with InnoDB tables. STEP 1 (First create the tables as InnoDB) CREATE TABLE agents (
5
15542
by: steve | last post by:
Hi, Besides transaction capability, is there anything else about innodb tables that makes it superior to myISAM? I really don’t need transactions, but for example, I need superior reliability for index (too many index corruptions in the past). Is innodb better in that area, or any other areas? -- Posted using the http://www.dbforumz.com interface, at author's request
4
2948
by: Good Man | last post by:
Hi there I have a database with about 20 or so tables, maybe a few thousand rows in each. I am starting to do more complex things with my insertions etc, and I want to start to use transactions, so I imagine I should change some table types in the database from MyISAM to InnoDB. I know that InnoDB tables are a completely different beast than MyISAM in terms of data storage etc... ie: instead of using folders on the server, everything...
0
2306
by: shakahshakah | last post by:
Just started investigating InnoDB after having used MyISAM tables in the 4.0.12 version, almost immediately ran into a locking issue with INSERTs, DELETEs, and transactions. Given the following table: CREATE TABLE test1 ( f1 varchar(32) default NULL ) and a steady stream of INSERTs from a command-line shell:
2
5475
by: daniel | last post by:
I have the following scenario. A mysql database running 3 databases. It is version 5.0.27 on Windows XP Prof.. All innodb databases. The one database is particularly large (7.8GB of data)...pretty much held in 1 table....there are probabably 30 tables in the rest of the databases....combined they probably take up 200MB. The machine is pretty well spec'ed AMD X2 4600+, 2GB RAM, SATA RAID1. Normally the services that use the databases are...
2
2126
by: MysqlBeginner | last post by:
Is this possible to have a MyISAM table on master server and change its storage engine (to InnoDB) on slave server in a replication environment? If this is possible, what should I consider before changing MyISAM to InnoDB on slave server? Here is the table structure CREATE TABLE `messages` ( `id` int(11) NOT NULL auto_increment, `subject` varchar(255) NOT NULL default '', `message` text NOT NULL, `attachment_path` varchar(255)...
0
9275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10034
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9872
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9843
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9713
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7248
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6534
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5142
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.