Jump to content

Recommended Posts

Posted

I recently posted a support topic where the /tmp directory of johnny filled up and this resulted in a user having their account suspended due to them taking up too many resources. This was understandable, but then a question entered my mind: How much of the resources do I use?

 

My first thought was server load. Then vars & tmp directories. At the moment, I'm not using much as my site's still in the early stages of development and It's basically hidden from the world (No Meta tags). I only have a couple of people popping in occasionally to help me with testing.

 

But it occured to me: I have and will be running some fairly complex mySQL queries and some recursive PHP functions. Being mostly a userbase of 1 right now, that's fine. However, if I had a page taking 0.1% of the server when used and I suddenly jumped to 300 users at any given time, my account would be gone in a blink of an eye. I like the setup here and I don't want that, unless my site's presence here becomes completely unrealistic and I have to move to paid hosting.

 

I have to be realistic about the demand I place upon the server.

 

The trouble is, I've no idea how to estimate the % server load a query/function call creates. Having consideration for other users, I'd like to test MySQL calls and PHP functions and calculate or in the very least estimate the server load created.

 

A regular execution time function will produce varying results based on server load so I reckon I'd be barking up the wrong tree there.

 

All said, I reckon prevention is better than cure and an eventual solution could benefit all users. If anyone has ideas about estimating server load, or wishes to point me towards something that I've overlooked, I'll be ecstatic.

 

Xoviat.

 

Posted
...my account would be gone in a blink of an eye...

Actually your account would be suspended and all your data and databases would still exist. You just get locked out and any visitors to your site see the suspended message. If that happens post here and we will unsuspend your account after you make a plan to use less system resources the next time around. I would be fine with unsuspending that person that was using 64% of the /tmp if they made changes too.

 

Anyways, here is what your account did yesterday:

xoviat    scrabblefreak.heliohost.org    CPU:0.01    MEM:0.24    PROC:0.0

In comparison the highest CPU number was 1.32, the highest MEM was 119.52 and the highest PROC was 1.6 so you're well under the limits. Obviously we can't really tell you how much load that will put if you get more users, but maybe you can remember how much use the site got yesterday and scale it yourself? You're sitting at 0,0,0 so far today. :lol:

Posted

@Krydos: Yep, my current traffic stats makes it appear so though I'm worrying over nothing, for now. :)

 

But I effectively did nothing on the site yesterday except create a few MySQL tables and add a few links. There was no testing either.

 

0.24 Mem, if it means what I think it does. Tells me that I may have been sloppy somewhere when disposing of variables. I can't think of any reason for that much to be residing in memory at that point.

 

I've only recently come home, so the current stats of 0,0,0 are no surprise :lol: . I'm at the beginning of putting together an internal mail system, after which there'll be more people in to test and usage will rise for a bit. I wish I could directly analyse the impact though.

 

If I occasionally asked one of the admin, if they could check my resource usage for the day (called the command that Krydos just called). Would that be acceptable? I can compare that with logfiles I keep of user actions. After a while, I'd be able to gauge the consequences of what demands my DB usage and PHP functions would have on the server and limit features with that in mind.

 

 

Posted
If I occasionally asked one of the admin, if they could check my resource usage for the day (called the command that Krydos just called). Would that be acceptable?

You can always ask whatever you want. Worst case scenario: We just say no, laugh at the request, or simply ignore you.

I wish I could directly analyse the impact though.

Yeah, I can't really think of anything off the top of my head. Maybe someone else can come up with something.

Posted

I would also like to do this.

I have a very similar situation and I'm worried about using too much. All my PHP code is written with what i've learned from w3schools and i haven't been programming too long (Started at 16, i'm 17) so i'm a bit worried about how much i use up.

 

I time my execution and queries. My normal execution time is <0.1 seconds and 2 to 5 queries depending on the page.

Could i also PM an admin when my site has some traffic?

Posted
Could i also PM an admin when my site has some traffic?

You can always ask whatever you want. Worst case scenario: We just say no, laugh at the request, or simply ignore you.

I would recommend against PMing though probably. If you PM an admin only the one admin sees it, but if you make a forum post ALL of the admins can see it. Furthermore, I know some admins just ignore PMs unless they specifically ask someone to PM them something.

Posted
You can always ask whatever you want. Worst case scenario: We just say no, laugh at the request, or simply ignore you.

 

Well of course, but I'd hope that you lot wouldn't do any of the above as I'd realistically be asking this in the best possible interests of the server environment which you administrate. :)

 

I wouldn't drive you all nuts with requests all the time, just when I've put in something major. I'll eventually be able to approximate how much resources /per task/ per website user as I log and can theoretically count instances of any task performed. Particularly whilst my site traffic is minimal (to say the least).

 

I would recommend against PMing though probably. If you PM an admin only the one admin sees it, but if you make a forum post ALL of the admins can see it. Furthermore, I know some admins just ignore PMs unless they specifically ask someone to PM them something.

 

Fair enough. There's probably about 100 things of higher priority to deal with before something like this and your time here is limited. Thinking about it, if you did it for me, 500 others might have the same idea and you'd never get anything done if you responded to us all. Guess I could just cross my fingers for an automated implementation in HelioPanel or similar. I believe it would be that useful.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...