hmm if i select something from a mysql and it returns 5 rows then i mysql_fetch_array it and put it in memcached

…I am on the correct computer.

er the windows box?

it's all under one box…

ty

anyone know how i can ensure that my db backup (using mysqldump) doesn't swallow all of the server's resources? I've nice'd the mysqldump process but it seems to still hammer the mysql db

np. Which function are you using?
You kinda want it to finish as quickly as possible…

i don't particualrly care how long it takes to run, but i do care whether it takes the server out while it runs

Use a better backup system

like what?

LVM, replication, etc.

hmm, so no regular dumps?

isn't there some sort of application that does this for me?

do you have a good starting point article about replication?

!man replication

see http://dev.mysql.com/doc/refman/5.0/en/replication.html

cheers

The idea with replication is you have a separate server hosting you use to take backups off of

ah right

Also look into backing up the binary logs (part of replication)
(if you cannot setup a separate server)

we can
thanks for the tip
(tips)

It's always nice to have a backup server

no kidding :-)
can i ask you one more question?

No

damn

You are only allowed one per day

you've already answered two

And since the world revolves around me, and it is 1AM

real quickl

dammit!
The world is ending

if i haven't set up mysql hosting replication ever before
but i'm *reasonably* proficient at mysql and linux admin (say intermediate level)
how long is it gonna take me, chief?

Uh
How fast can you read?

(rough guess… an hour… 3 hours… couple of days… 25 years…)
fast

I guess it takes less than an hour, minus the time it takes for the initial import

how fast can you debug when you did not read properly

Or how long will archivist be up

:-)
archivist… replication… sounds like we're in a Philip K Dick novel…

bah fiction, dont read it

do MySQL servers dream of electric websites?

the inner loop dreams of serving

long live the inner loop

something and have the output as csv or something?

use mysqldump with –tab options

thanks

hi. how do i prevent that UPDATES executed by the replication thread stay in LOCKED state for several minutes so that the slave falls far behind the master?
it's myisam, mysql 4.1
on the slave there are many parallel SELECTs on the Table to be changed by the UPDATE
it seems the UPDATES are queued until there is a little pause where no SELECT is executed

thermoman, use InnoDB or SolidDB tables
the problem only arises because of MyISAM's table level locking
http://nileshbansal.blogspot.com/2007/07/mysql-lock-contention.html
although that's probably the reverse of what you want

aren't normally the UPDATES making the SELECTs wait instead of vice versa?

yes that's what I'd have thought

or is this a special treatment since it's the replication thread?

select that already started will have to finish before the update runs, new select will wait

this is definetly not the case here … i have updates waiting minutes, letting the slave fall more than 30 minutes behind the master

make sure that low_priority_updates is disabled?

via my.cnf?
i never see a SELECT in state LOCKED on the slave, only the UPDATES from system user

SET LOW_PRIORITY_UPDATES OFF

insert low priority

this is no optiion for us because when using insert low priority the master is in locked state very long

low-priority-update on?

on or off?

if on, update will have lower priority than select

i need to turn updates on the slave to higher priority
but not on the master

no need, just don;t turn on low-priority-updates

ok, i'll check

update by default higher priority than select

I was suggesting you make sure it's not on..
or.. move over to InnoDB/Solid
and forget all of this table level locking nonsense

oops
| low_priority_updates | ON |
| low_priority_updates | ON |
innodb is not always a solution … then selects are slower when using autoincrement i think
but we'll try.

I was suggesting that because you already know the auto incrementing id (as it's a replica) and you seem to have a fair mix of selects & updates it might help with the table contention problem
implying*

we definetly try innodb … but not on fridays

ah

fridays are bad for "change a running (but slow) system

we're doing a big MS exchange and an office move at the same time and nobody's in until tuesday
which will be fun

then the sh hits the fan

when there are no users thats ok … but having a productive database this is a bit complicated

for some reason we moved from innodb to myisam, then there were complaints that nobody could do hot backups *bangs head on desk*

yeah … tar cfz /foo.tar /Var/lib/mysql

hmm, if i select something from a mysql and it returns 5 rows, then i mysql_fetch_array it and put it in memcached.. how do i do when i want to print it then? before memcached i just did $things = mysql_query("bhlahanl"); while($test =
mysql_fetch_array($things)){ print $test['field'] } — can i put all the data in an array and store it in memcached, and then print it somehow?
becouse i cant put a mysql return directly in memcached, i have to do something with it first..

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Comments are closed.


Blog Tags:

Similar posts: