IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New PHP Memory limits.
The default in the php.ini file is (IIRC) 8Mb. Since that is miniscule in the world of PHP programming, I would expect Wordpress to raise it. However, it can be raised at any time by a PHP page, so you should probably look in the Wordpress settings. Failing that, I'd be grepping for "ini_set"; I wouldn't put it past Wordpress programmers to quietly set no limit (-1).

Beyond that, the next port of call would be a Wordpress forum. I know how to program a site to use less memory, but not how to tell Wordpress how to.

Wade.

Q:Is it proper to eat cheeseburgers with your fingers?
A:No, the fingers should be eaten separately.
New What if there are multiple, conflicting calls?
wp-admin/includes/file.php: @ini_set('memory_limit', '256M');

wp-content/plugins/google-sitemap-generator/sitemap.php: @ini_set('memory_limit', '64M');

wp-content/plugins/google-analyticator/google-analytics-stats-widget.php: @ini_set('memory_limit', '96M');

wp-settings.php:
if ( !defined('WP_MEMORY_LIMIT') )

define('WP_MEMORY_LIMIT', '32M');

if ( function_exists('memory_get_usage') && ( (int) @ini_get('memory_limit') < abs(intval(WP_MEMORY_LIMIT)) ) )
@ini_set('memory_limit', WP_MEMORY_LIMIT);

Hmm, wonder what I can set that to in wp-settings.
--

Drew
New Two answers.
If they are called in sequence, the latter one wins. But multiple calls in a codebase usually mean there are multiple include paths. Some pages get one, others get another. Looking at the filenames, I'd say pages get either one default or the other except for the two specific pages with their own values.

32M is a reasonable default size for a site, though I wish it was lower. It suggests some effort has been made at some point to the codebase to reduce the memory footprint. It's a bit worrying, though, that those two Google pages need 64M and 96M; that's on the large side. OTOH, 256M for the admin suite is probably not so bad.

I'd also go looking for that function, memory_get_usage().

Wade.

Q:Is it proper to eat cheeseburgers with your fingers?
A:No, the fingers should be eaten separately.
New Just found php.ini has a 90M limit
I've got a VPS with 300M guaranteed, 600M spike limit, so I'm guessing if I have seven PHP instances executing at the same time I exceed it. Does that sound right?

If so, is there a way to configure PHP (or Apache?) so that any additional requests after the first six are delayed rather than starting to execute and then get killed by the process nanny?
--

Drew
New Re: Just found php.ini has a 90M limit
StartServers         2

MinSpareServers 2
MaxSpareServers 5
MaxClients 7 <---- that one
MaxRequestsPerChild 1000


Of course I'm oblivious to what might happen... people will wait.

FYI, I already see a significant wait time to have your site render. I'm not so sure you want to limit the number of instances...
New Noticed that recently too
What's odd is that when it does come up, it comes up all at once. Is there a directive that instructs the browser not to render until all the images are downloaded?
--

Drew
New That can happen if your software isn't
providing the image dimensions to the browser....
New But it is ... I already made sure of that ... oh wait
Sonofabitch. Several sidebar widgets didn't have their dimensions listed.

Ehh ... just fixed them all and it still waits until everything is there to render. Firebug is showing 3-7 seconds for the initial page get. That blows.
--

Drew
New CSS listed first on the page?
And Javascript should be last, after the content. CSS is required to properly render, and the Javascript will single-thread and cause everything to wait while it is being retrieved.
Regards,
-scott
Welcome to Rivendell, Mr. Anderson.
New Don't think that's the problem
That 3-7 second delay I mentioned is on the first page load. Nothing else starts downloading until after that.
--

Drew
New Have you tried FireBug's Net tab or IEWatch?
Something that tells you what is loading when, and how long it takes.
Regards,
-scott
Welcome to Rivendell, Mr. Anderson.
New That's where I get the 3-7 seconds for initial page load
--

Drew
New No long delay here + a couple of observations
The redirect from www.cooklikeyourgrandmother.com to cooklikeyourgrandmother.com adds almost a second to the initial page load time in my case. It also generates a second DNS hit. If your DNS server is slow to resond or you have a broken forwarder (say a certain type of Belkin wireless router) this could easily exacerbate the delay.

There are no long delays downloading parts once the root page is loaded. I do see long delays closing connections, but that does not seem to have an effect on page display. The delays occur on both sides, so this may just be the way HTTP works. E.g. the last request is finished after 9s but the last connection is closed at 22s.

The blog doesn't have the redirect overhead and otherwise behaves the same as the main page.

Most of the static content you provide (images, css, ...) has the Expires header set to April 15 2010. This sets up an extra trip to the server for everything that is used more than once.
New Thanks for noticing the expires header
The article I copied some optimization tips from was written in 2007. At the time 2010 was "far future".
--

Drew
New Not necessarily.
PHP doesn't allocate the whole memory to a thread when it starts; the number is what it uses to terminate a thread if it asks for too much. In your VPS, you should be able to run nearly 100 that use no more than 6M. Theoretically. In practice, it will be somewhere in the middle, due to system memory overhead and the fact few complex PHP pages will come in under 6M.

Then, too, that 90M limit will apply to any pages that don't override it with their own limit. How did you go with that Wordpress memory limit setting?

Wade.

Q:Is it proper to eat cheeseburgers with your fingers?
A:No, the fingers should be eaten separately.
New Haven't played with it yet
I want to try that later at night when it's not so busy, so I can isolate what I'm doing.
--

Drew
     Need help analyzing web server performance - (drook) - (20)
         Wordpress is in PHP, isn't it? - (static) - (17)
             Yes it is - (drook) - (16)
                 PHP Memory limits. - (static) - (15)
                     What if there are multiple, conflicting calls? - (drook) - (14)
                         Two answers. - (static) - (13)
                             Just found php.ini has a 90M limit - (drook) - (12)
                                 Re: Just found php.ini has a 90M limit - (folkert) - (9)
                                     Noticed that recently too - (drook) - (8)
                                         That can happen if your software isn't - (jake123) - (7)
                                             But it is ... I already made sure of that ... oh wait - (drook) - (6)
                                                 CSS listed first on the page? - (malraux) - (5)
                                                     Don't think that's the problem - (drook) - (4)
                                                         Have you tried FireBug's Net tab or IEWatch? - (malraux) - (3)
                                                             That's where I get the 3-7 seconds for initial page load -NT - (drook) - (2)
                                                                 No long delay here + a couple of observations - (scoenye) - (1)
                                                                     Thanks for noticing the expires header - (drook)
                                 Not necessarily. - (static) - (1)
                                     Haven't played with it yet - (drook)
         Bleah you are using PHP. - (folkert) - (1)
             Surprisingly today... - (folkert)

Keep up the good work. Those dark sides need more advertising.
78 ms