[wp-trac] [WordPress Trac] #23216: Create "WP Heartbeat" API
WordPress Trac
noreply at wordpress.org
Mon Apr 15 07:52:03 UTC 2013
#23216: Create "WP Heartbeat" API
----------------------------+------------------
Reporter: azaozz | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 3.6
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: autosave-redo |
----------------------------+------------------
Comment (by DavidAnderson):
As I read the code on the original submission, the heartbeat runs always,
regardless of whether it has any consumers using it. I'd suggest that it
should only run if it has consumers - i.e., a more sophistcated API. If it
does so, then it could potentially *reduce* server load (since all the
parts of WP wanting a regular poll would ride onto the one heartbeat,
instead of implementing their own). However if it runs *always*, even if
not doing anything useful, it may be problematic.
If running always, then I'd suggest that some evaluation of performance
impact is done for typical use cases. Otherwise, even if its impact is
small, we may get more budget hosts saying "WordPress is a big performance
hog", or more armchair tech pundits will start saying "don't run WordPress
on a low-budget server".
What makes me suspect that it will have a real-world, measurable impact is
that I have a plugin which if you open its admin page, it polls via AJAX
to check the 'last log message' every 5 seconds. If I open two admin pages
on localhost, then I can hear the CPU fa
n ramp up. CPU load goes from 0.40 (average when I'm just clicking around)
to about 1.1 (average with 2 admin pages open with polling every 5
seconds). This is on a 1-year-old low-end laptop (T4500 dual-core, 4Gb, so
no swapping is going on). So, not comparable to to proper web hosting, but
possibly comparable to people who like to manage their own WordPress
install and who buy a bottom-end VPS for it. This makes me think that it's
non-trivial and that a proper, scientific evaluation would be valuable so
that we'd know one way or the other whether it affects anyone or not.
Based on my experience, a poll-every-15-seconds heartbeat means that every
1 admin page is adding about 0.2 to the average CPU load. So if a hosting
company had 10 WordPress admin pages open at any one time on a server,
they need an extra 2 CPUs, were they crazy and using Pentiums from low-
budget laptops - which would be crazy of them; but you get the point -
it's potentially a measurable affect.
David
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23216#comment:57>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list