Score:0

MYSQL: Many slave servers with smaller resources or less with larger resources

cn flag

I want to create High availability with Master Slave replication (for Select query).

I am wondering which one is better:

  1. Having smaller resources slaves but more servers or
  2. Having larger resources slaves but less servers

I only use One Master for modify query: (update / insert / delete)

Score:1
ua flag

It depends.

The most likely thing to adjust in hardware is RAM. If you tune innodb_buffer_pool_size to about 70% of RAM and that is bigger than the size of all the data, then there will be very little I/O.

If that is not practical (or too expensive), then if the "working set size" is small enough, you still get benefit for that cache.

Else you will need some I/O horsepower.

Don't worry about the speed or the number of CPU cores. That is rarely the bottleneck.

Use this to discover which queries are in the most need for optimizing: http://mysql.rjweb.org/doc.php/mysql_analysis#slow_queries_and_slowlog

Add 2 cheap Replicas and see how well they perform, then come back with some more numbers to discuss.

yodann avatar
cn flag
My slave database is 16Gb, and this is the innodb config innodb_buffer_pool_size=2G innodb_buffer_pool_instance=7 is it good enough?
djdomi avatar
za flag
is that 70 percent of the database size no? that's what it has been answered to keep the i o low
yodann avatar
cn flag
ah yes, now I get it. I have set innodb_buffer_pool_size=12G, around 70%. but how many innodb_buffer_pool_instance to set?
ua flag
The buffer_pool should be bigger than the dataset, but definitely not bigger than available RAM. 70% of _RAM_ is a good setting.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.