Powered by Invision Power Board


  Reply to this topicStart new topicStart Poll

> PHP: measure wait time? profiling?
ren-prod-inc
Posted: Jun 1 2005, 04:48 PM
Quote Post





Group: Members
Posts: 30
Member No.: 92
Joined: 22-October 02



I have a bunch of new PHP code that I've been developing. I'm looking at possible performance issues.

Currently I'm using microtime to measure the time taken to generate a page, and time spent in i/o routines.

The time spent in i/o routines is small. The time spent generating a page is larger than I would like.

The problem is, I don't know how to determine wait-time. I know i/o time isn't the problem, but don't know whether the problem is simply that my PHP code is doing a lot of stuff (which it is) or whether the server is doing other things and my code is waiting.

Suggestions? tia.
PMUsers Website
Top
andy
Posted: Jun 2 2005, 08:58 AM
Quote Post





Group: Advantagecom Staff
Posts: 4,340
Member No.: 9
Joined: 12-July 02



QUOTE
but don't know whether the problem is simply that my PHP code is doing a lot of stuff (which it is) or whether the server is doing other things and my code is waiting.


That can be tough to determine. For us to be any help on that, we'll need to know what kind of account you have and if it's a VPS, we'll need some bit of information like a subscription ID or VPS ID that will allow us to identify which server your account is on. Then we can take a look at the load on the server your account uses.

Also, how much time are we talking about regarding time spent generating a page being too long?


--------------------
Sincerely,
Andrew Kinney
CTO, Advantagecom Networks

Please do not private message me. My regular management duties preclude responding to every customer that sends me a support issue. Instead, post on the forum or contact tech support.
PMUsers Website
Top
ren-prod-inc
Posted: Jun 3 2005, 06:32 AM
Quote Post





Group: Members
Posts: 30
Member No.: 92
Joined: 22-October 02



QUOTE
That can be tough to determine.  For us to be any help on that, we'll need to know what kind of account you have and if it's a VPS, we'll need some bit of information like a subscription ID or VPS ID that will allow us to identify which server your account is on.  Then we can take a look at the load on the server your account uses.


I'm pretty sure it's on schmolie39 (www.ren-prod-inc.com), it's definitely one of the cobalt servers. The problem here is that it only runs when I'm testing it, it's not in produciton yet.

QUOTE

Also, how much time are we talking about regarding time spent generating a page being too long?


A while back it was taking in the neighborhood of 1-3sec to generate any given page; lately it's been taking 3-12sec.

I'll see about adding some debug code for profiling. I have a feeling though that some part of the problem is all the other debug code that I've added for debugging, LOL. <g>
PMUsers Website
Top
andy
Posted: Jun 5 2005, 02:57 PM
Quote Post





Group: Advantagecom Staff
Posts: 4,340
Member No.: 9
Joined: 12-July 02



I took a look at secure39.schmolie.com and it turns out that there was a runaway vim (vi) process taking up 100% of the CPU for about the last week. Ironically, it was branded with your username, indicating it was a program you ran at one point. Vim will do that sometimes if your Internet connection gets dropped or it is otherwise not exited properly.

Normally, we catch that kind of stuff much sooner, but the IP renumbering and related support has kept us from those tasks for an extended period.

I killed off that process. Let me know if you still have trouble.


--------------------
Sincerely,
Andrew Kinney
CTO, Advantagecom Networks

Please do not private message me. My regular management duties preclude responding to every customer that sends me a support issue. Instead, post on the forum or contact tech support.
PMUsers Website
Top
ren-prod-inc
Posted: Jun 9 2005, 04:02 AM
Quote Post





Group: Members
Posts: 30
Member No.: 92
Joined: 22-October 02



QUOTE (andy @ Jun 5 2005, 04:57 PM)
I took a look at secure39.schmolie.com and it turns out that there was a runaway vim (vi) process taking up 100% of the CPU for about the last week.  Ironically, it was branded with your username, indicating it was a program you ran at one point.  Vim will do that sometimes if your Internet connection gets dropped or it is otherwise not exited properly.

LMAO, serves me right! <g> I am one of the world's worst vi users, worse than raw newbie, sometimes can't remember how to exit the thing. I probably tried to edit some file and broke the connection in frustration. Thanks Andy.
PMUsers Website
Top
ren-prod-inc
Posted: Jun 12 2005, 06:54 AM
Quote Post





Group: Members
Posts: 30
Member No.: 92
Joined: 22-October 02



Just an interesting tidbit to add to Dr Bizarro's notebook of Strange Facts And Occurrences...

This morning my page-generation times are back in the <3sec range. I guess something on the server changed, no idea what.
PMUsers Website
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll