TinyPortal

Development => Support => Installation => Topic started by: hartiberlin on December 13, 2007, 08:01:03 AM

Title: Splitting one SMF 1.1.4 / TP 0.983 database into 2 databases
Post by: hartiberlin on December 13, 2007, 08:01:03 AM
I use:    
SMF Version: SMF 1.1.4
Mods installed: TinyPortal 0.983
Admod 2.3
Using default theme: no, modded Azure Theme.
Link to site: www.overunity.com


Is it possible to split a SMF database into 2 databases and using
each one every half hour and swap them then and synchronize
them, so they contain the same contens and same users ?

I would need this:

1. For backup reasons
2. I only have 100.000 queries and 100.000 questions per hour to the MySQL database
so I could avoid this bottleneck limit in a timeframe where bigger traffic is required ..

This way, I could make 200.000 queries and 200.000 questions
to the databases...which my hoster said would be okay.

Many thanks.

Regards, Stefan.
Title: Re: Splitting one SMF 1.1.4 / TP 0.983 database into 2 databases
Post by: G6Cad on December 13, 2007, 08:12:02 AM
SMF questions is supported on simplemachines.org
Title: Re: Splitting one SMF 1.1.4 / TP 0.983 database into 2 databases
Post by: IchBin on December 13, 2007, 02:58:52 PM
The only way you'd be able to switch db's is if you were able to run something like a cronjob. And as G6 has stated, what you have asked really doesn't deal with TinyPortal.
Title: Re: Splitting one SMF 1.1.4 / TP 0.983 database into 2 databases
Post by: hartiberlin on December 13, 2007, 06:23:38 PM
Well,
okay,it is not so related to TP,
but as here are many SMF pros, maybe
they have any comment about it ?

Well. other than this only problem with the limited database queries traffic,
the hoster is just great !

Maybe it can be done by using a copy tool ,
just copying the one used database into a new one.

Such a copy tool my hoster has already online.

One would only need to write a cronjob that does the following:

each half hour:
1. set the Forum into maintanance mode
2. copy existing database into a new database via my hoster´s Import-SQL-databe-tool
3.Modify the Settings.php file for the new database name
4.disable maintanance mode,so the forum is live again now with the other database name

Would this be difficult to write ?

If this would be run say,  each 15 minutes I could even get 400.000 queries per hour.
The only problemI see is, that it takes a few minutes to copy the about 80 Mbytes database
file to a new database.

Regards, Stefan.
Title: Re: Splitting one SMF 1.1.4 / TP 0.983 database into 2 databases
Post by: bloc on December 14, 2007, 12:58:58 AM
I would say its possible, but really a detour of the real problem: lack of bandwidth/resources. It would mean a lot of strain on the two db's too, having to be swapped entirely so often. I would think that is *much* worse than anything else. Imagine you had to rewrite your harddisk so often..I would not bet it lasted that long then.

And frankly, if the host has a limit to quieries, but allow this operation to your db, they clearly don't quite understand what they are doing.
Title: Re: Splitting one SMF 1.1.4 / TP 0.983 database into 2 databases
Post by: Dragooon on December 14, 2007, 04:45:04 AM
Since it is servage, I understand why they don't understand.(NOTE: I am taking your host is servage after seeing your sig).
Title: Re: Splitting one SMF 1.1.4 / TP 0.983 database into 2 databases
Post by: Zetan on December 14, 2007, 12:35:21 PM
That is almost Spam in your sig hartiberlin, as it links to an affiliate account.
Title: Re: Splitting one SMF 1.1.4 / TP 0.983 database into 2 databases
Post by: hartiberlin on December 14, 2007, 12:37:27 PM
Yes, it is servage.net

So basically you all say, I should change the hoster ?

Are there any simular hosters, that have about 200 GB space
and at least 2 TerryByte traffic per month and that don´t
limit the querries to the database ?
I make about 12 to 25 GB traffic per day.

Is there something for this around 20 US$ per month ?
A good control panel would also be needed with it like
CPanel or something simular.

Many thanks.
Title: Re: Splitting one SMF 1.1.4 / TP 0.983 database into 2 databases
Post by: Dragooon on December 14, 2007, 12:45:57 PM
Thats a total overseller and there is nothing like 300 GB space and 3 TB B/W in 20$/Mo. It costs like 500$/mo If you REALLY want that.

Whats your real usage of resources?
Title: Re: Splitting one SMF 1.1.4 / TP 0.983 database into 2 databases
Post by: hartiberlin on December 14, 2007, 01:44:49 PM
Is it possible to put the tables of SMF into different databases,
so to have in Settings.php 2 ormore databases defined ?

This would be one solution, if SMF could split up the data and
write them into different databases, as I am limited in one database
to 100.000 queries per hour.
If I could split this up and use 2 or more databases for SMF,
I could circumvent this limit.

Also are there any hosters, that just specialize on just hosting
SQL databases ?
As I could also host just the SQL database for SMF on a different hoster,
this should also work just to host the SQL database somewhere else
and not on servage...

Regards, Stefan.
Title: Re: Splitting one SMF 1.1.4 / TP 0.983 database into 2 databases
Post by: Zetan on December 14, 2007, 01:50:15 PM
Look, this is TinyPortal.. not SMF.
We've given suggestion, why complicate something that works?

The suggestion was, upgrade the hosting package.. change the host, or for the best results if you're site is using this many resources, a dedicated server.