Current time: 05-28-2017, 08:52 PM Hello There, Guest! (LoginRegister)

Post Reply 
Dreamhost PS Manager
04-27-2009, 03:48 PM
Post: #1
Dreamhost PS Manager
I have written a Dreamhost API application that dynamically manages the size of the memory of a Dreamhost virtual private server. Having recently moved to a Dreamhost PS myself I initially started building this for my own use, however I am making it freely available to anyone else who may be interested under an open source license.

For more information and to download this application see: Dreamhost PS Manager.

The application resizes the memory of a Dreamhost PS based on actual usage and can optionally allow you to follow the resizing of your Dreamhost PS via Twitter.

If you decide to use or try this application, I'd be happy to receive some feedback as to your experience.

Otto - 7is7.com

Otto - 7is7.comDreamhost VPS ManagerDreamhost Promo Codes
Visit this user's website Find all posts by this user
Quote this message in a reply
05-26-2009, 11:35 AM
Post: #2
Dreamhost PS Manager
Hi,

I just found your application and will try to install it.

Nobody else has given any feedback yet ?

Thanks.
Find all posts by this user
Quote this message in a reply
05-26-2009, 11:54 AM
Post: #3
Dreamhost PS Manager
Thanks for trying it out! Do let me know how it works out for you.

BTW. I have just released a new version (version 0.2.3) which contains some minor policy tweaks.

I have had some feedback by e-mail so far, they seemed to like it. Many more downloads, but of course I don't know if they actually use it or not.

Otto - 7is7.com

Otto - 7is7.comDreamhost VPS ManagerDreamhost Promo Codes
Visit this user's website Find all posts by this user
Quote this message in a reply
05-26-2009, 05:05 PM
Post: #4
Dreamhost PS Manager
Great !

Thank you, it works, but I will test it better during the next days as I have a quite high traffic website during evening.

Would it be difficult to add an option to schedule to set my PS at max from 7pm to midnight everyday ?

Thanks a lot, I was really waiting for a tool as this one, Dreamhost should buy it from you to provide it to users !
Find all posts by this user
Quote this message in a reply
05-27-2009, 12:57 AM
Post: #5
Dreamhost PS Manager
Thanks for using PsManager, I am glad you like it!

Quote:Would it be difficult to add an option to schedule to set my PS at max from 7pm to midnight everyday ?

It might be possible to add something to that effect.
With Maximum, do you actually mean 4000 MB (ie. the maximum available)?

BTW If you want me to e-mail you when there is a new version send me an e-mail (find my contact page at the bottom of the webpage about psmanager or any other page on my site).

Otto - 7is7.com

Otto - 7is7.comDreamhost VPS ManagerDreamhost Promo Codes
Visit this user's website Find all posts by this user
Quote this message in a reply
05-28-2009, 02:16 AM
Post: #6
Dreamhost PS Manager
Hello,

Yes, I would need to set up the PS at 4000 MB every evening from 7pm to midnight and I explain why with an example:

Yesterday night more than 30 people/minute were hitting one of my site but your script never set up my ps more than 3466 MB and i got 1500 errors because of that (i have a tracker on error page).

And i am lucky that I already set the factor on your script at 2 instead of 1, because i would have had thousands of errors.

Usually i get few errors when the ps is set up at 4000 MB, but never that much, so i would need to set the server at max every evening but not 24 hours because it's not useful and the website doesn't make enough money to pay a full PS full time.

In case you can't help is there anyway to disable your script automatically during evening but still use it the rest of the time? Any cron command to do that ?

Thanks a lot for everything !
Find all posts by this user
Quote this message in a reply
05-28-2009, 04:27 AM
Post: #7
Dreamhost PS Manager
Wow! Those are impressive numbers. You're the only one I know with such high usage, so I am very interested in your case.

I actually have a change ready that would allow you to do what you want, I wanted to make some more changes before pushing this new version. But since it's important to you I will push it with just this change asap.

I'll post back here when it's done.

Otto - 7is7.com

Otto - 7is7.comDreamhost VPS ManagerDreamhost Promo Codes
Visit this user's website Find all posts by this user
Quote this message in a reply
05-28-2009, 06:41 AM
Post: #8
Dreamhost PS Manager
The new version is available (version 0.2.4): PsManager

There is a new config file with it, that contains a bit of commented out code, supplied as an example.

# ADVANCED - Example for time dependant minimum of 500MB.

#{
# my ($sec,$min,$hour) = localtime();
# if ($hour>=19 && $hour<23) {
# $mem_min = 500;
# $memory_factor = 1;
# }
#}

You can copy this into your config file, and uncomment it, and change the mem_min from 500 to 4000. Also you don't need to check that the hour is less or equal to 23 (it always is). For your requirements you'd get this:

# ADVANCED - Example for time dependant minimum of 500MB.

{
my ($sec,$min,$hour) = localtime();
if ($hour>=19) {
$mem_min = 4000;
$memory_factor = 1;
}
}

Let me know how this goes.

Additional note:

The main cause of the problem you are encountering with the server errors is because you only get 450MB of swap memory. Which is incredibly low. Shared servers run on 4000MB of RAM and get 6000MB of swap memory, we get only 450MB. With only 450MB it's hard to deal with traffic bursts.

I have entered a suggestion to increase swap memory, but it hasn't appeared in the list yet. When it does it could use some support from other PS clients to get DH's attention. I'll probably post more about this sometime in the next few days.

Otto - 7is7.com

Otto - 7is7.comDreamhost VPS ManagerDreamhost Promo Codes
Visit this user's website Find all posts by this user
Quote this message in a reply
05-31-2009, 10:24 AM
Post: #9
Dreamhost PS Manager
Thank you so much !

So if i want to try and write this:

{
my ($sec,$min,$hour) = localtime();
if ($hour>=19 && $hour<23) {
$mem_min = 2000;
$memory_factor = 1.5;
}
}

It will set the PS to 2000MB minimum from 7pm to 11pm with a factor of 1.5 ?

And what happen if i setup this configuration and then the server needs more memory, it will increase even if time is between 7pm and 11pm? But never go below 2000MB ?

Also, about the time, i need to set the ps at 2000 MB minimum at 7pm French time, should i change something as servers are in America ?

Thanks a lot !
Find all posts by this user
Quote this message in a reply
05-31-2009, 02:03 PM
Post: #10
Dreamhost PS Manager
The code you gave would do the following from 19:00 to 23:00 :
- Take the actual memory usage and multiply that by 1.5
- Check if that is lower than 2000 if it is set it to 2000.

So yes, If you are using say 1800 MB it will multiply it by 1.5 and set memory at 2700MB (higher than 2000MB). But if you are using 1200 MB it will multiply it by 1.5 which is 1800MB, but since this is lower than 2000 MB it will set it at 2000 MB.

My servers are on california time, I suppose yours are too, which means that you should convert local French time to local California time. However France and the USA start and end Daylight Savings time at different dates. So this it getting a bit more complicated.

It's probably better to simply change the timezone the script runs in to Central European Time (which is what France uses):

{
$ENV{TZ} = "CET";
my ($sec,$min,$hour) = localtime();
... etc...

Otto - 7is7.com

Otto - 7is7.comDreamhost VPS ManagerDreamhost Promo Codes
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: