ElkArte Community

General => Chit Chat => Topic started by: emanuele on January 02, 2015, 06:09:26 am

Title: Server config questions
Post by: emanuele on January 02, 2015, 06:09:26 am
Long story short: I'm moving a forum to a VPS. There is a huge table, and I start feeling a bit uneasy about memory usage.
I am converting all the tables to innodb, when I realised that as far as I remember innodb tends to like RAM and eat a lot of it. Am I wrong?
In the db I'm transferring there is a table that is about 3GB, it contains logs that inserted but almost never read.
I know the best way would be to just reduce the number of records in the table, but for the sake of discussion, and for at least the first period of time, would a 1GB of RAM be enough or the system will fall under the weight of this table even if it's only used for inserts?
Title: Re: Server config questions
Post by: Joshua Dickerson on January 03, 2015, 01:44:17 am
InnoDB does tend to use more RAM. You need a lot more info to even guess how MySQL will react. Calculate the indices for that table. It will swap if anything, not necessarily fail. Just do a test and see how it goes.
Title: Re: Server config questions
Post by: emanuele on January 08, 2015, 07:54:05 am
Yeah, I guess the only way is to try...

Well, I did a test move and let him try a bit (because my first impression is that the VPS is slower than the shared and I'm not really surprised).

Anyway, another question: do you have any tutorial (or suggestion) on installing memcached (or xcache?) on centos 6.6?
Title: Re: Server config questions
Post by: Spuds on January 08, 2015, 10:53:06 am
Why would the VPS be slower, is it that under spec?

I'd think to install it would just be yum and then config the ini
Code: [Select]
yum install php-xcache xcache-admin

If its a recent php version you can use its opcache and then just use xcache for user data.
Title: Re: Server config questions
Post by: emanuele on January 08, 2015, 11:08:41 am
Because it's an odd situation.
At the moment it's on a shared with plenty of resources (IIRC it's a 24 or 32 cores server with an average load of 15, so not that bad), it is able to handle loads up to 110 without really killing the page (slowing down, yes, but still up, tested with SMF 2.0.8 and all the create_function pushing very hard on it).
The page loads vary a lot between pages (from 0.3 seconds (message index) up to 3/4 seconds (aeva main page)).

On the VPS... is even worse. The first load is terrible (I just tried with a topic it took 42 seconds to load, then the first refresh is 1.8 and the second 2.1). On the shared, the same topic too 0.8 on first load (that likely was not really the first one, 5.7 on the second, 1.2 on the third).

Then, again on the shared 22 seconds to log into the admin panel against 0.6 for the VPS.

Completely inconsistent results...
Title: Re: Server config questions
Post by: Spuds on January 08, 2015, 11:50:40 am
Yeah, that could be several of things, but I'd probably start with my.cnf and the standard buffer suspects.

You could also use 2 VPS's, one for just mysql transactions and one for the front end, that can help as well, of course it cost more as well :P
Title: Re: Server config questions
Post by: emanuele on January 08, 2015, 11:53:53 am
/me needs the usual smashing-head-on-wall smiley :P