Previous Thread
Next Thread
Print Thread
Rate Thread
#281800 11/08/2004 4:49 AM
Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
I have been having aproblem with my site being slow and I thought it was my hosts webserver. Here is what he emailed me

Mike:
Unfortunately you're the one causing this.

Here's output from top showing some of your PHP threads gobbling down over a gig of RAM, and bringing the load average to up over 60.

top - 01:41:32 up 54 days, 7:35, 3 users, load average: 59.75, 59.32, 61.17
Tasks: 316 total, 80 running, 231 sleeping, 2 stopped, 3 zombie
Cpu(s): 0.2% user, 99.8% system, 0.0% nice, 0.0% idle
Mem: 2068488k total, 2021264k used, 47224k free, 5908k buffers
Swap: 2040244k total, 2040244k used, 0k free, 45984k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
14590 efs 16 0 841m 675m 1608 R 5.4 33.4 0:40.54 php
14580 efs 19 0 383m 124m 1572 R 4.1 6.2 0:19.88 php
21520 efs 20 0 3768 3768 1616 R 2.9 0.2 0:01.26 php
13155 efs 19 0 889m 178m 1572 R 2.4 8.8 0:36.96 php
14088 efs 20 0 420m 118m 1572 R 2.3 5.9 0:20.42 php
Those threads alone total 1094 megabytes, and that's just a sampling of what's running.

Maybe this ties into the long loading times on your site? Your site may have some sort of serious bug.
All told, your PHP scripts were taking 3.5 gigabytes of RAM =\





This is something I don't understand so maybe someone can give me some advice.

Last edited by ChAoS; 11/08/2004 5:00 AM.
Sponsored Links
Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
Can you enable zlib compression.

Also if you can, turn on debug information in the footer, and run through your board to see how long pages with large threads load.

Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
Generated in 3.348 seconds in which 3.304 seconds were spent on a total of 37 queries. Zlib compression enabled.

barbiro #281803 11/08/2004 12:57 PM
Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Mike I saw your site (IIP) and it shows as you said:

Generated in 3.527 seconds in which 3.482 seconds were spent on a total of 36 queries. Zlib compression enabled.

I would first start reducing the number of IIP information there is on the index screen. Also another way is for you to increase the cache time for IIP (it can be done through the control panel of IIP). Also when users log in get them to go to the main index and not the entrance (if you have installed that modification)

Finally a suggestion is to reduce the information on the sidebar. It is my view that people don't really need to see the short stats all the time - but then again it is just me talking here.

Try shuffling around the information displayed and monitor it with your host.

In the past I had seen one of my forums nearly bringing down the host's server and Jeremy was very helpful in trying to find out the cause with me. It appeared that by installing a modification for the who's online on all pages (below the nav bar) I was killing the database.

I hope this information helps a bit.


Nikos
Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
Thanks for the advice.This was not always happening though as with the same info I am displaying now the page time was half of what it is now. I guess I may have to go through the mods and see which one is doing it. THe only recent thing I belive I have installed was PhotoPost.

Sponsored Links
Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
If it is the photopost integration with ubbthreads then for sure not the cause since its footprint is concentrated on including a stylesheet and allowing the users that check the gallery to use the same login.

Try to have a look whether you installed any modifications that enrich the information on the post screens (showflat or showthreaded). That usually has a huge impact on the database as well.

What I also saw is that when I look at one of your posts the debug information changes to :

Generated in 0.699 seconds in which 0.659 seconds were spent on a total of 31 queries

which is roughly the same amount of queries but 3 seconds faster. The solution must be in the IIP I think. Try deactivating all the pal boxes and refresh the cache. Then reload the page with only 2 or 3 boxes and keep some statistics. Tweaking the pal boxes that appear will definitely help. Finally try reducing the newspal display boxes (say make it 2 or 3)


Nikos
Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
I have disabled all my custom PAL boxes, the short stats,poll boxes and then I tried without my header and footer and the page load time is still bad. Somewhere something is fouled up as I said before this just strted happening. Its definately something on the Entrance page though-I just disabled the entire News section and its still up to a 3.00 load time

Last edited by ChAoS; 11/08/2004 2:06 PM.
Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
I think I may have found it. I disabled the Top Poster Pal box and my Entrance page loads at .5 with 18 queries. I will start adding in the other boxes now

Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
Definately something with the Top Posters Pal

without it
Generated in 1.69 seconds in which 1.645 seconds were spent on a total of 37 queries. Zlib compression enabled.

with it
Generated in 3.381 seconds in which 3.338 seconds were spent on a total of 38 queries. Zlib compression enable

Joined: Sep 2003
Posts: 803
Coder
Coder
Offline
Joined: Sep 2003
Posts: 803
not to drag off topic but this is my page load time.

Generated in 0.202 seconds in which 0.155 seconds were spent on a total of 33 queries. Zlib compression enabled.


Does this seem slow? or a problem? Im on dsl and it is super fast loading.

Just curious...

Last edited by DrChaos; 11/08/2004 3:31 PM.
Sponsored Links
Duck #281810 11/08/2004 3:55 PM
Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
Thats like lightning-you are fine
I compare mine to what is running here at ThreadsDev for a benchmark -as we all know they are on top of things

Last edited by ChAoS; 11/08/2004 3:57 PM.
Joined: Sep 2003
Posts: 803
Coder
Coder
Offline
Joined: Sep 2003
Posts: 803
sweet

adding the iip mod back tonight

Duck #281812 11/08/2004 3:59 PM
Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
is Zlib compression html compression or MySQL compression? My host was inquiring.

Last edited by ChAoS; 11/08/2004 4:25 PM.
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yeah, 2 tenths of a second is faster than a blink of an eye - or pretty close.

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
The zlib compression that is mentioned in the debug statement is PHP compression and not mysql.


Nikos
Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
Well for the time being I have it disabled. I am not sure what would have changed as I dont remember it causing grief before.

Here are my settings

How many top posters should I display: 10

How many days back should the toprecentposters check back? 0

Exclude Any Boards from Top Recent Posters? none checked

Should we cache top posters information to decrease page generation times? (this was set to 0 and now it is 360 with no real change)

Last edited by ChAoS; 11/08/2004 7:39 PM.
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
try the How many days back should the toprecentposters check back? 0 setting it to 7.. basically 0 is setting it to look back to the beginning of time..

also you may be experiencing problems chewing this line

if ((!$LastCacheTime) || (!$TopPostersData) || ($LastCacheTime < ($date - ($configpal['topposterscache'] * 60)))) {


and BTW I haven't changed any of these scripts except for changing language strings and the config functions. It is the same script it has always been..

Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
[]scroungr said:
and BTW I haven't changed any of these scripts except for changing language strings and the config functions. It is the same script it has always been.. [/]

I realized that and thats what I don't understand this seems to be a recent development . The only thing that I have done is installed PhotoPost (since the problem) now I know there is a settting in PP to increment a users post count when they comment or post an image but I set both of those to "false" Do you think somehow this issue could be connected?

Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
Honestly, I think the general load issue is itself caused by PHP clearly running as a CGI instead of using the Apache module.

However, the time spent in MySQL is certainly the fact that generating that page is just taking too long doing too many queries. The only solution to that problem would be cutting down on the query count, and the nasty ones in particular...


UBB.classic: Love it or hate it, it was mine.
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Doing top posters in the last x days is very intense on the DB as it has to do all it's sorting and counting from the post table. It's speed will be proportional to the number of posts in the post table. That particular pal is a nasty one. I wrote it, but it's not meant for large boards.

Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
Large boards meaning ones that have a large db? Mine has been up for 4 years this december and is close to 30mb db. Is that large? I am not being sarcastic I am honestly asking

Boards:
3948 Total topics
53848 Total replies

Totals:
417 Members
57796 Posts

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
I would say thats large I trim my fat occasional. My philosphy is if the post han't been looked at in over a year its deletable

Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
thats like burning a history book

hehe well maybe there is some clutter I can do without-that is gonna take some time.

Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
Thank you everyone for the help


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,834
Joined: January 2000
Forum Statistics
Forums63
Topics37,575
Posts293,931
Members13,824
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)