Webmastersite.net
Register Log In

Extremely slow to load pages and use 100% CPU
Extremely slow to load pages and use 100% CPU

Comments on Extremely slow to load pages and use 100% CPU

milouchouchou
Forum Regular

Usergroup: Customer
Joined: Nov 05, 2006
Location: Borlo Belgique

Total Topics: 27
Total Comments: 121
Extremely slow to load pages and use 100% CPU
Posted Sep 26, 2013 - 1:11 AM:

Hello Paul

In recent weeks, I have a problem with this script.
1 - This problem is extremely slow to load pages and use 100% CPU of my hosting.
2 - In addition, when your updates, many files are not copied correctly, there are only a few hundred lines then they should make a few thousand.

The cache script was regenerated and nothing changes the problem.

For one problem, would it not download.php file used to display pictures of categories?
A simple display would it not less greedy because each page there are 40 pictures to display.
And then another portion of the script in a loop.

Here is the message received from my host:

CPU resources were limited for your site

Your site might hit resource limits soon

You had 10 entry processes (number of simultaneously running php and cgi scripts, as well as cron jobs and shell sessions) out of 10 max entry processes allowed

You had 999 I/O usage out of 1024 max I/O usage allowed

And this is what gives me the CPU usage of my hosting, this for 6 pages displayed with this script:

Current Usage
Description Usage Limit Fault
CPU Usage 100% 100% -
I/O usage 0 1024 -
Entry Processes 6 10 0
Physical Memory Usage 221.16M 1.00G 0
Virtual Memory Usage 191.29M 1.00G 0


Can you look at these problems in advance thank you.
Cordially.
Fancis

Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 26, 2013 - 2:08 AM:

Were you seeing download.php used for displaying images? If so, this may be a template problem. Make sure you're displaying images with the thumbnailing template variables and not the download template variables. For a custom category field, <img src="{CATCUSTOMATTACHTHUMBURL[100 <,> 100]}">

I thought you sent me an inspection request recently but I can't find it so please send: http://www.wsnkb.com/inspection.html
milouchouchou
Forum Regular

Usergroup: Customer
Joined: Nov 05, 2006
Location: Borlo Belgique

Total Topics: 27
Total Comments: 121
Posted Sep 26, 2013 - 8:59 AM:

When I look at the image information of the categories, I see this:

]http://www.milouchouchou.com/artic...=imagearticleattach


I remind you that this is a custom field.

I send you an inspection as you ask.

Cordially.
Francis

Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 26, 2013 - 9:39 PM:

I see {CATFOLDERIMAGE} is serving up the download.php's instead of making a thumbnail. The solution is more complicated than anticipated but I'm working on it.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 26, 2013 - 11:33 PM:

Fixed so all the folder images are cached 200x200 thumbnails now. Let me know if the load remains high.

2 - In addition, when your updates, many files are not copied correctly, there are only a few hundred lines then they should make a few thousand.

I've never seen this happen, but it's suggestive of a timeout stopping the upgrade in the middle. It could be that this server does filesystem operations slower than most, or that something in the site configuration makes upgrades slower (though I can't see what that could be).
milouchouchou
Forum Regular

Usergroup: Customer
Joined: Nov 05, 2006
Location: Borlo Belgique

Total Topics: 27
Total Comments: 121
Posted Sep 27, 2013 - 1:55 AM:

Hello Paul

I just tested and the problem is always the same.
Attached is the result of the CPU usage of my cPanel.

These photos are those that are before the title of the article and each page displays a list of these items so 40 titles 40 photos.

The fields in the database is imagearticleattach (eg content for Airedale race on the first page of the list - 7c5b3.wsn [,] 7.jpg [,] 2 [,] 200 [,] 160 -
When I check the information of the photo with Firefox, I have this:

www.milouchouchou.com/artic...p;field=imagearticleattach

- For the problem of damaged when transferring files, I get the file from the previous R1Soft backup server and I sent back with FileZilla, it is the only solution I've found yet.

Good day.
Cordially.
Francis


Attached Files:
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 27, 2013 - 5:35 AM:

I didn't notice you had a custom listing field too. Can you link me to the URL of the page those images appear on? I can't find them.
milouchouchou
Forum Regular

Usergroup: Customer
Joined: Nov 05, 2006
Location: Borlo Belgique

Total Topics: 27
Total Comments: 121
Posted Sep 27, 2013 - 8:51 AM:

If you go to this link

www.milouchouchou.com/artic...icles/les-races-de-chiens/

the 40 breeds on this page are those who use these photos in the title, the five links to the categories above also refer to lists of breeds that use photos in the title.

All the articles in other categories also have a photo in the title.

Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 28, 2013 - 6:03 AM:

All of those are cached now, is the load down?
milouchouchou
Forum Regular

Usergroup: Customer
Joined: Nov 05, 2006
Location: Borlo Belgique

Total Topics: 27
Total Comments: 121
#10 - Quote - Permalink
Posted Sep 28, 2013 - 9:44 AM:

Hello Paul
Thank you to work on the problem, but it's really not what we can "fast" although everything is cached.

I enabled the debug mode, which always works for you check.

For the home page, it is time to load but reasonable
http://www.milouchouchou.com/articles/
24 total queries
This page was created in 2.13 seconds

For the presentation page of races, it is still extremely long to load
www.milouchouchou.com/artic...icles/les-races-de-chiens/
30 total queries
This page was created in 28.01 seconds

For rare breeds page with only 14 photos for 40 titles, it is also far too long
www.milouchouchou.com/artic...les-races-de-chiens-rares/
29 total queries
This page was created in 9.38 seconds

For comparison, the main home page of my site with 11 photos is load
http://www.milouchouchou.com/
Page loaded in 0.096 seconds

Sorry to insist with the loading time, but there must be a serious problem somewhere.

Cordially.
Francis

Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#11 - Quote - Permalink
Posted Sep 28, 2013 - 10:42 AM:

I see it's taking over half a second to process template variables for each listing there, which is much slower than for my sites strangely... I'll step through the source to try to determine why.

You'd get much faster rendering if you changed the 40 listings per page to a smaller number, but it shouldn't be this slow per listing.
milouchouchou
Forum Regular

Usergroup: Customer
Joined: Nov 05, 2006
Location: Borlo Belgique

Total Topics: 27
Total Comments: 121
#12 - Quote - Permalink
Posted Sep 28, 2013 - 11:43 AM:

I just tested with 12 items per page and this gives:
30 total queries
This page was created in 4.89 seconds
What still seems excessive.

Compared to 28.01 seconds for 40 items, the difference in loading time is not related, 4.89 seconds multiplied by 3 should give about 15 seconds to a few tenths to four more titles, or to display 40 titels is the double of this theory.

The problem occurs with Firefox, Chrome and Opera browsers.

It's really not my week with this script.
I am preparing a small file to explain some problems encountered with multilingual display translations of the script.

I expect that the current problem is resolved not to overload you, so I'm waiting for your green light before suggesting these problems.

For information, here is the configuration of my PC
Fujitsu Siemens
Intel (R) Core (TM) 2 Quad CPU Q9300 @ 2.50GHz 2.50 GHz
Memory 4.0 Gb
Windows Vista Service pack 2 32 bit
Antivirus AVG Internet Security 2013

Cordially.
Francis

milouchouchou
Forum Regular

Usergroup: Customer
Joined: Nov 05, 2006
Location: Borlo Belgique

Total Topics: 27
Total Comments: 121
#13 - Quote - Permalink
Posted Sep 28, 2013 - 11:47 AM:

Currently Parse error: syntax error, unexpected T_IF in /home/milouch1/public_html/articles/includes/commonfuncs.php on line 4956

Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#14 - Quote - Permalink
Posted Sep 28, 2013 - 1:53 PM:

Parse errors just show up while I'm in the middle of uploading a change and it hasn't fully uploaded yet.

I went through everything carefully for the past 4 hours and made a bunch of optimizations but they were only able to shave a few seconds. There's no specific bottleneck, each template variable is being processed in about a hundredth of a second but there are 30 template variables per listing (after I wrote an optimization to remove duplicates and removed some unnecessary bits from your listing bit) and 40 listings.

There are no slow mysql queries, it's just processing all those template variables.

Compared to 28.01 seconds for 40 items, the difference in loading time is not related, 4.89 seconds multiplied by 3 should give about 15 seconds to a few tenths to four more titles, or to display 40 titels is the double of this theory.

The slowness of a page naturally snowballs as the longer it takes to finish the higher the server load goes and the higher the server load goes the slower the script runs.

Leaving it at 12 per page would cause the load to subside over time which might make it start to run a little faster than 5 seconds.

milouchouchou
Forum Regular

Usergroup: Customer
Joined: Nov 05, 2006
Location: Borlo Belgique

Total Topics: 27
Total Comments: 121
#15 - Quote - Permalink
Posted Sep 29, 2013 - 1:06 AM:

Ok Paul, thank you for this work.

I leave 12 items per page in order to have a normal loading time, I understand the number of variables to be processed for each template.

I'm sure visitors will enjoy the site came back with normal speed.

Then will the multilingual issues, demand is ready to be sent on the forum.

Good Sunday.
Cordially.
Francis

Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.