Resource Limits

wordpress

#1

Greetings,

Thanks to some handy panel changes it is now very possible to check our resource limits, except doing so has also caused me some heart burn.

I run a few phpbb sites generally open sourceware, including my own open source project site for the WP/Gallery2 Plugin and found the following…

Resource limits: 30-40 CPU mins equals 1800 to 2400 secs

500 odd users a day visiting a phpbb board will consume around the 550-600 cpu seconds

Smaller boards say around 150 vists a day will consume around 250 cpu seconds…

Wordpress Blogs roughly the same levels for the same amount of visits as phpbb.

Basically run about three boards with 500 users a day and you have exceeded your account.

I just struggling here to find this limits realistic, we are not talking heavy boards, with huge numbers of visitors just plain phpbb boards with attachment mods and a few other very minor modifications generating a few GB of traffic a month…

I do not want to leave Dreamhost but I am struggling to find how I can stay within the resource rules. I am hoping DH will reconsider the resource limits or give us an option to buy a boster pack for more resource usage.


Wordpress Gallery2 Integration Community


#2

I was wondering where I remembered your login id from… ('had been reading up on your wordpress plugin).

Anyway. 'I had wondered the same, mostly since in the resources output it says: “CPU percentage assumes 24000 cpu seconds per day total.”

24000 seconds = 6.6 hours.
(2400 would be the correct one… = 40 minutes)

'One too many zeros.
Byron

P.S. As a cute extraction… figure 2 physical cpu’s per machine, giving 48 cpu hours per day. Thats 2880 available minutes.

Divide out 40… gives you 72 sites per machine. I wonder how close that is to what they really do? :slight_smile:


#3

:slight_smile: For the WPG2 Plug in comments…

To me 2400 is just way way to low and I also feel it should be based on a plan not set as a global DH amount regardless of what plan you are on…

I would hate to leave DH but 2400 does not come close to what I feel is a realistic CPU resource utilisation plan limit.


Wordpress Gallery2 Integration Community


#4

Seems like it would make more sense to have cpu resource limits based on cost/plan structure.

Honestly… they’ve been so quiet on this issue, that I’m not sure I’d worry unless they contact you.

(It does beg the question of being prepared to move, and to where though).

In the meantime, I’ll stop clicking refresh on your wpg2 site… :slight_smile:
Byron


#5

If you have not heard from us, you are ok. Out of a total of 24000 cpu seconds available, allowing each user to use 2400 (10%) is pretty reasonable. There’s a lot more than 10 users on each of our machines!

Our dedicated server plans are very reasonably priced if you find yourself needing more horsepower.

  • Dallas
  • DreamHost Head Honcho/Founder

#6

Sorry but these sums just do not add up, I think the 24000 number being quoted is wrong in the KB article, which quotes 3600 CPU seconds per Hour * 24 Hours = 86400 not 24,000.

86400 when allocated a maxiumum of 2400 CPU seconds a day is less than 3% of the CPU time which very low.

Going on your figure of 10% that would be 8640 not 2400.


Wordpress Gallery2 Integration Community


#7

Where is that kbase article? I did not find it with a quick search.

I believe 24,000 cpu seconds per day is the correct number. Also, if you have not been contacted by us, you are ok. 30-40 per days is the suggestion, but we are flexible on it as we know website resource usage varies quite a bit from day to day and week to week.

  • Dallas
  • DreamHost Head Honcho/Founder

#8

Hiya Dallas,

https://panel.dreamhost.com/kbase/index.cgi?area=3079

"We measure server resource consumption in CPU minutes. This number indicates how much time a processor spends working for your username. All shared hosting customers should use less than 30-40 cpu minutes per day for all their users on their account.

If you see a number referenced as cpu seconds, simply divide by 60 to get cpu minutes."

Which would mean 86400 not 24000


Wordpress Gallery2 Integration Community


#9

They got the script from

http://software.hixie.ch/utilities/unix/sa-analysis/sa-analysis.pl

And there doesn’t appear to be anything on Mr Hickson’s site(s) to explain the value he used. However given that CPU time is going to be less than wallclock time, perhaps that is why someone thinks $secsPerDay should be less than 86,400?

:cool: Perl / MySQL / HTML CSS


#10

Maybe I’m missing something… Where does that article say anything about the maximum cpu time a server can handle?

I just see 40 cpu minutes per day * 60 seconds per minute = 2400 cpu seconds per day with no mention of the total for the whole server.

  • Dallas
  • DreamHost Head Honcho/Founder

#11

Ths issue is here in the script…

my $secsPerDay = 24000; # XXX hardcoded

If you see 24000 is the limit the author is allocated per day thus expressed as a %, 24000 IS NOT the limit of the CPU as you can clearly see by the variable naming, MY $secsperday (whic btw should be set to 2400 for DH), thus DH assumption of a CPU maxiumum of 24000 is flawed.

CPU time is is measured in CPU-seconds defined as the time of CPUs (based the wall-clock time) spend running, thus the maximum number of CPU seconds per day should be 86000 NOT 24000 as being quoted.

When you look at my real world resource examples, you see 1800 to 2400 does not go very far and as applications get more power hungry is just going to get less and less as times go on right now the diskspace and bandwidth limits we get given are pie in the sky when been hobbled by 2400 maximum limits.


Wordpress Gallery2 Integration Community


#12

Oh, I see the confusion. Sorry we weren’t more clear. CPU time is NOT directly related to real clock time. One second of one process running can use more than one cpu second, and likewise one second of one other process running can use less than one cpu second, depending on a variety of factors.

I found this definition:

Our kbase article is a little misleading in that it does not define CPU second correctly. I will see about making it more clear.

We have a lot of users using up their bandwidth and disk space allotments without using up much cpu so it’s definitely possible! Different types of web sites have different needs.

Message boards are pretty much the most cpu intensive web application widely used today so that’s probably why your usage seems so high to you. Several of our dedicated server customers have message board based websites. Busy weblogs can also use up a fair bit of cpu time if they have a lot of dynamic content shown on each page view.

Also note that these limits are enforced by humans (and not machines) and there is some leeway. The 30-40 cpu minutes ‘limit’ is intended as rough guideline only.

  • Dallas
  • DreamHost Head Honcho/Founder

#13

I asked the script author about the value he used for “cpu seconds per day” and he said that the value is arbitrary, the one he used gave the right percentage, and he doesn’t know what the right number should be.

:cool: Perl / MySQL / HTML+CSS


#14

Just go in yourself to ~/logs/resources

fire up your favorite editor and fix sa.analysis.pl. 'Should work. We’ll see tomorrow. (Change it from 24000 to 2400)

Byron


#15

Hmm. It appears they overwrite it somehow…

Bummer


#16

Forgive me but I’m not clear on something. Are the resource limits per user or per account? In other words, if I have 2 sites maxing out the CPU under the same “user” then would it make a difference to switch one of the sites to run cgi under a different user? All my sites are running under the main “user” as a default.

Last night, my cgi scripts stopped running properly. I’m still waiting to hear from support on this but is it possible that I maxed out the CPU limits and that’s why they weren’t running? If I switched one of the sites to a different user, would that help?

Hope


#17

The process accounting is per-user but really we need you to keep your usage for the whole account under the limit. Remember that we don’t disable your site or any of your scripts just for hitting these limits, though.

There is a process watcher system that will kill processes we deem to be over specific limits, but that is independent of the process accounting this thread is about. You should check to see how many processes you have running. You can use ‘ps aux’ to see them. If there’s more than 30 or so you will probably have problems. Most websites don’t need more than a few processes running at any one time.

  • Dallas
  • DreamHost Head Honcho/Founder

#18

Thank you. It seems I only have a few. Is this a way to determine CPU usage as well? I see a heading for %CPU. I have no idea how it interpret the rest. Is there a site where I can read up on this?

Edited to add - I guess it would be Linux…


#19

The %CPU tells you how much of the total cpu available each process is using. If there’s only a few processes, they would generally have to be using 50% or more of the CPU to be considered a problem. Also, the load on the server would have to be over 2 (since it’s a dual processor machine). You can see the current server load with the ‘uptime’ command.

If all of that looks ok, your current CGI issues are probably caused by something other than your resource usage.

It is Linux, yes. You can use the ‘man’ command to read documentation (manuals) for specific commands, though the man pages are often fairly technical. ‘man ps’ for instance.

  • Dallas
  • DreamHost Head Honcho/Founder

#20

Thanks Dallas. The load average shows 1.41, 1.74, 1.82. I don’t know if that’s a good thing or not. Obviously if it’s not over 2 that would be good but 1.82 is getting close (I assume).

One more question - regarding the process watcher system that will kill processes deemed to be over specific limits - where can I find out if this is what happened?

Thanks again.
Hope