Luke,
As far as I know you can't do that in mysql, it would have to be at the
kernel level.  Replication threads, really don't use much cpu anyway at
least not on the master, since all it's doing is basically reading a binary
file.

Now the kernel itself does do something like you are talking about, but I
have no idea how it decides what is going to use what proc.

Now, my master box which is only running mysql and which is replicating to 2
different slaves, but also handles all selects and inserts for about 6
webservers looks like this.


Cpu0 : 10.1% us,  4.0% sy,  0.0% ni, 71.5% id, 12.6% wa,  0.5% hi,  1.2% si
Cpu1 :  2.2% us,  1.1% sy,  0.0% ni, 94.0% id,  2.5% wa,  0.0% hi,  0.1% si
Cpu2 : 10.3% us,  4.1% sy,  0.0% ni, 70.7% id, 12.9% wa,  0.8% hi,  1.3% si
Cpu3 :  2.9% us,  1.4% sy,  0.0% ni, 92.4% id,  3.2% wa,  0.0% hi,  0.2% si
Cpu4 :  8.9% us,  3.5% sy,  0.0% ni, 80.1% id,  5.8% wa,  0.6% hi,  1.2% si
Cpu5 :  2.3% us,  1.1% sy,  0.0% ni, 93.7% id,  2.7% wa,  0.0% hi,  0.1% si
Cpu6 :  8.8% us,  3.4% sy,  0.0% ni, 80.5% id,  5.6% wa,  0.6% hi,  1.2% si
Cpu7 :  2.5% us,  1.2% sy,  0.0% ni, 93.2% id,  3.0% wa,  0.0% hi,  0.2% si

So the load is being shared by all of the procs, just no idea what decides
where.

Donny

> -----Original Message-----
> From: Crouch, Luke H. [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 26, 2004 10:36 AM
> To: [EMAIL PROTECTED]
> Subject: replication threads on different CPUs
> 
> I'm a bit of a linux newbie and a newbie to replication, so I'll try to
> ask this question simply...
> 
> we're using mysql 4 to do replication, and I notice on the master I have
> this from using mytop:
> 
>       Id      User         Host/IP         DB      Time    Cmd Query or
> State
>       --      ----         -------         --      ----    --- ----------
>     2670      root       localhost       rmps         0  Query show full
> processlist
>     2668      repl      rh-mysql-4                  409 Binlog Has sent
> all binlog to slave; waiting for binlog to be updated
>     2666      repl      rh-mysql-2                  411 Binlog Has sent
> all binlog to slave; waiting for binlog to be updated
>     2667      repl      rh-mysql-3                  411 Binlog Has sent
> all binlog to slave; waiting for binlog to be updated
> 
> it looks like three seperate threads are running on the master here, one
> for each slave. in this particular machine, we have 2 HT processors, so 4
> possible CPU threads. if it's not done automatically by Linux (RedHat 9)
> or MySQL, can I configure these threads to use their own CPU to maximize
> the performance? I assume MySQL or Linux will do this automatically.
> 
> we have the same machines in use for the slaves...so can I make the slave
> IO thread execute on one processor, and the slave SQL thread execute on
> another? does this happen automatically as well?
> 
> thanks,
> -L
> 
> Luke Crouch
> 918-461-5326
> [EMAIL PROTECTED]
> 
> 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to