mysql - pt-online-schema-change boosts so many copy threads? -


the other day, use pt-online-schema-change add column , index table, table 1 million rows , .ibd file size 5g bytes.

i tried several times each time got error says process aborted duo critical load reached (which threads_running=60, use , never failed before)

i found strange using show full process list: there many copy threads there like:

replace `db`.`_some_table_new` ... 

running long time (tens , hundreds of seconds) , in status of 'update'.

as know pt-online-schema-change use 1 copy threads , use tool many times , each time can observe 1 thread chunking , copying time changed, there many copy threads blocking there.

i searched documents in percona.com , can not find information option multi-threaded copying.

the table altered time accessed frequently, think not cause problem long there single copying thread.

could give me help, thanks!

the replace statements run triggers created pt-online-schema-change.

pt-online-schema-change runs 1 thread. triggers might executed many other client threads doing insert/update/delete on original table.

pt-online-schema-change not magical way alter table free. has cost. every update table becomes 2 updates.

it sounds server can't handle load of running pt-online-schema-change while have heavy traffic running updates against original table. server can't keep doing these updates fast executed clients. fall behind , queue up.

you upgrade more powerful server. more cpu cores , faster i/o system might help. expensive.

the simpler solution schedule table changes later time when have lighter traffic.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -