Question for a first install

Hello,

I’ve joined the wpmudev premium community.

I have 2 questions about the multi-db :

I have actually 600 blogs (but only 100 active max). Should I choose 16 or 256 ?

define (‘DB_SCALING’, ’16’:wink:;

How can I find these parameters ? What is the class c ? Everything will be on my one and only dedicated server.

//


//

//—DC IPs


//

//


//

// Usage: add_dc_ip(IP, DC)

// EX: add_dc_ip(‘123.123.123.’, ‘dc1’:wink:;

add_dc_ip(‘123.123.123.’, ‘dc1’:wink:;

Thanks for your help

  • drmike
    • DEV MAN’s Mascot

    One thing also to consider is where do you plan to be 12 months down the road. On average how many folks sign up every day? If it’s only a few, I’d lean more towards the 16 dbs. Have to admit though we’re just doing 256 right out of the box for all of our new installs. We don’t know where folks are going to be in the future.

    I believe Andrew is doing all of their installs with 4096 though.

    The Ip address is the one for where your dbs are located. (ie the IP address for your box.)

  • Luke
    • The Crimson Coder

    There really isn’t a magic number that says for X number of blogs, use X number of databases. It all comes down to hardware, traffic, and the database load that traffic generates.

    For shared hosting, splitting the databases isn’t going to be of much use, other than to buy you time. And “most” hosts, while they may advertise an “unlimited” number of databases, are going to cut you off when you put a bunch on there. I’ve seen it first hand in fact, when someone created 16 user db’s, one global db, and 3 “vip” databases. It didn’t make a difference, as their overall account still crunched a bunch of db time.

    Than again, someone shouldn’t be using shared hosting with MU anyway. :slight_smile:

    Back to the topic at hand, like I said there isn’t any real magic number. It’s all about the hardware, traffic and load. An install with high traffic but a low blog count will produce more load than light traffic with a lot more blogs, for example. Essentially, more traffic equals more load. Period. 5 blogs with really high traffic could bring a single server setup to its knees, where it might take another site with low traffic and 2500 blogs to do the same thing.

    Only an admin can know realistically what their site draws in terms of traffic and users. Daydreams aside, and looking at reality of course.

  • drmike
    • DEV MAN’s Mascot

    One thing to also note, most “unlimited mysql databases” installs of CPanel actually only give you 999 of them due to an outstanding bug that won’t allow admins to set a limit to unlimited. Last time I knew still wasn’t resolved.

    Doesn’t affect the poster but just to throw that in there. Make me look like I’m paying attention instead of watching all the pretty coeds walk by. :wink:

  • Enseignement
    • Design Lord, Child of Thor

    I don’t get this line too :

    add_db_server(‘global’, ‘dc1′, 1, 1,’64.120.23.72′,’192.168.0.101’, ‘wpmu_global’, ‘db_user_name’, ‘db_user_name_pass’:wink:;

    add_db_server(‘0’, ‘dc1′, 1, 1,’64.120.23.72′,’192.168.0.101’, ‘wpmu_0’, ‘db_user_name’, ‘db_user_name_pass’:wink:;

    What’s the difference between the 2 IP ? How can I find them ?

  • drmike
    • DEV MAN’s Mascot

    First IP address is the publicly accessible IP address for the server. The second IP address is for any private (or local) ip address for the server. Use the actual IP address for the first one and 127.0.0.1 for the second one if you want.

    Actually glad he added that in as we’re looking into using backend db servers.

  • drmike
    • DEV MAN’s Mascot

    That’s how you tell wpmu which tables belong in the global database (ie wp_user) and which ones need to be created for each and every blog. (ie wp_1_links or whatever it’s called now a days.)

    You leave off the prefix though so it looks like this:

    add_global_table(‘user’:wink:;

    add_global_table(‘usermeta’:wink:;

    I believe that’s how to create the line. I’m on one of my locked down terminals and can’t double check but that does sound right.

  • Enseignement
    • Design Lord, Child of Thor

    Is there a problem if my db is my actual db charset is set to :

    define(‘DB_CHARSET’, ‘latin1’:wink:;

    ?

    When I use db-tools, it’s set to utf-8

    Please note that there the db-config-256 and 16 are different in the list of the IP.

  • Enseignement
    • Design Lord, Child of Thor

    Sure,

    in db-config-sample-16, you’ll find :

    in db-config-sample-256, you’ll find this slight difference

    I’ve also noticed this error :

    The links to do the process are refering to move_blogs.php?table=copy … it should be move-blogs.php?table=copy

    I also got multiple errors with mysql_free_results on line 124 and 125.

    Normal ?

  • Andrew
    • Champion of Loops

    in db-config-sample-16, you’ll find :

    in db-config-sample-256, you’ll find this slight difference

    Sorry, still not clear on what you’re referring to.

    I’ve also noticed this error :

    The links to do the process are refering to move_blogs.php?table=copy … it should be move-blogs.php?table=copy

    Good catch. We’ll get that fixed up in the next release.

    I also got multiple errors with mysql_free_results on line 124 and 125.

    Normal ?

    Exact errors please.

    Having a no wpmu site on this host. Someone could help please ?

    Something probably isn’t right with the db config information.

    Thanks,

    Andrew