Thanks Puqing and Michael. Michael, I don't get it. How can (2) and (3) be "sort of" the same? When you mean same - you mean they give the same results?
>From my naive point of view, it seems that (3) can deliver better results since we basically torn the db apart - one for each purpose. If (2) can give near-to or similar performances as (3), it will be BRILLIANT as it means a lot less re-development time. :) Thanks for the quick response! Kelvin Quee +65 9177 3635 On Wed, Jul 22, 2009 at 12:27 PM, Michael Clark<[email protected]> wrote: > Kelvin Quee wrote: >> >> Hi SLUG! >> >> I need advise on this. >> >> I have a db which is being constantly updated and queried by a few >> computers. We are doing datamining. The machine is running on a >> moderately powered machine and processors constantly hit 90%. >> >> At the same time, we need to present these data on a web interface. >> The performance for the web interface is now very sluggish as most of >> the power is occupied by the mining process. >> >> I have thought of a few ways out of this - >> >> 1) Buy a mega powered machine (temporal solution, quick fix) >> 2) Do a master-slave configuration >> 3) Separate the DB into 2 - One for pure mining purposes, the other >> purely for web serving >> >> For (2), I do not know if it will be very effective since the master >> will probably have many changes at any moment. I do not understand how >> the changes will be propagated from the master to the slave and how it >> will impact the slave's performance. Anyone with more experience here? >> > > 1. Buy lots of cheap ram first and bump up the innodb buffer pool sizes to > 2.5-3GB (or higher if you are on 64bit) > > 2 and 3 are sort of the same thing. > > You basically enable binlogs on your master instance, and the slave instance > slurps up the logs in real-time. > > http://dev.mysql.com/doc/refman/5.1/en/replication-howto.html > > Then you use the slave for doing your data mining/decision support queries. > > You could even run these two instances on the same box and still benefit. > e.g. as long as you can partition the IO and CPU e.g. the slave instance has > its own disk spindles, and nice the CPU on the slave mysqld process so that > the master always takes priority to serve up the queries from the web. > > The only disadvantage is that it will take twice the space. > > ~mc > > _______________________________________________ Slugnet mailing list [email protected] http://wiki.lugs.org.sg/LugsMailingListFaq http://www.lugs.org.sg/mailman/listinfo/slugnet
