6 ms·
> Wordpress 3.6 – 20.0% gain (253 vs 211 req/sec) How do you generate 211 pages per second on Wordpress to begin with? My server does page generation for my ow
by lucb1e 13y ago
> Wordpress 3.6 – 20.0% gain (253 vs 211 req/sec)
How do you generate 211 pages per second on Wordpress to begin with? My server does page generation for my own custom-built blog in ~15ms, but takes a whopping three seconds for a single Wordpress page. I know it's somewhat offtopic and it's about the relative results, but what hardware is this?
- muppetman 13y agoAre you running an opcache like Zend Opcache, APC, XCache etc? 3 seconds is amazingly slow.
- lucb1e 13y agoI meant raw page generation times. With caching it was much quicker of course. I assume the PHP benchmarks are also non-cached, else you're just benchmarking the caching method.
- muppetman 13y agoYea, opcache "caches" the compiled PHP code. So the first "page generation" might take ages, because PHP has to load all the .php files and compile them. But an opcache will _keep_ the compiled versions around, so the next time you need to execute the .php files, it can skip the (very expensive) step of compiling them again. This makes PHP much, much faster. The only time the files are recompiled are if you restart your webserver, or if you modify the .php files. I'm not talking about static html generation, that's another thing all together.
- pjbrunet 13y agoCould just be your hosting. For example, with Media Temple (years ago) I found it often took 7+ seconds just to redirect www to non-www, up to 12 seconds. Pingdom is a good tool to see where you're getting stuck http://tools.pingdom.com/fpt/ http://tools.pingdom.com/fpt/ Another common problem, your MySQL database could be overloaded (especially with shared hosting) and more caching won't necessarily solve the problem.
- lucb1e 13y agoIf it's my hosting (which was an eee pc btw) then why does my self-written blog load in 15ms? But yeah on shared hosting with more cpu power, wordpress performed much better.
- coldtea 13y ago>If it's my hosting (which was an eee pc btw) then why does my self-written blog load in 15ms? Because it hit some sweet spot that WP blew over for your host specs? Either memory, number of queries, etc?
- lucb1e 13y agoCPU seems to be the issue, but somehow Wordpress and the like (most CMS systems) seem to hit it while all PHP code I write runs perfectly fine.
- dangrossman 13y agoMy Linode VPS spits out WordPress pages in 33.811ms (via ApacheBench, concurrency=10 for a couple hundred requests). I don't use any kind of content/page cache. There's no reason WordPress would be 200 times slower than your custom blog -- WordPress isn't some kind of complex software. It's a handful of very small PHP classes that choose a theme file based on the URL, include it, run a database query to select some posts, wrap the result rows in objects, and pass them to the theme to spit out. I've had hundreds of concurrent visitors on my blog without registering any load. If your site is taking 3 seconds to return a page, there's something wrong and it's not the choice of blog platform.
- lucb1e 13y agoI meant a clean wordpress install. No themes, no plugins, just a basic install. Three seconds. My own blog does about 3 mysql queries and manages that in 8ms at best (usually 22ms at worst; typical seems to be around 15ms). The most limiting factor for Wordpress was cpu speed.
- deleted 13y ago[deleted]
- bhousel 13y agoMaybe try increasing the PHP memory limit? I don't think Wordpress is causing the slowness you are seeing.
- will_work4tears 13y agoYeah, WordPress can get slow pretty quick, but a naked install should be pretty snappy. The codebase itself is pretty small (~50kLOC) but the DB queries can get ugly depending on the plugins installed. Naked WP on GoDaddy or similary crap shared hosting site can be slow, but certainly not on a VPS.
- lucb1e 13y agoMostly CPU usage would jump to 100%, it's not mysql or RAM shortage. I know an Intel atom isn't much, but it ought to do better than this, especially compared to custom software.
- driverdan 13y agoThis is not a WP issue. It's most likely a bad plugin or theme. You can use something like P3 (Plugin Performance Profiler) to see where the issue is. It could also be a misconfigured system. WP requests should never take 3 sec.
- thefreeman 13y agoJudging from your other responses, it sounds like you are running it on something like this: http://www.ebay.com/itm/like/181342056669?lpid=82 http://www.ebay.com/itm/like/181342056669?lpid=82 You really can't judge it based on that hardware. Of course it runs slower then your "custom" blog... it is probably orders of magnitude more complex. Also you haven't mentioned what platform you are using. I don't know if those netbooks run linux or windows, but if you are trying to host this on a desktop version of windows with something like Xampp it is really incomparable as well.