I recently attended Kalid's discussions about the mega-server running 2.8 million pageviews a day at Drupalcon, and it was an awesome eye-opener. Thanks for doing that sir, I learned a lot about what I can be doing better.
I have since installed APC on my system, and the speed difference is unreal. I am running AuthCache using APC for authenticated caching.
I have noticed that sometime during the night, my server is getting flaky. MySQL seems to run wild, and the APC cache gets very fragmented. I wake up, and several of my new stories are showing the Site Offline message, like the DB went down and the message got cached perhaps.
A quick restart of Apache and MySQL and clear the cache, and the problem is solved. But I am guessing this is not normal behavior.
Is this potentially do to heavy fragmentation in APC? I noticed this morning when I woke up there were over 6,000 fragments. Or should I be using cron to restart apache during the night? Is my cache potentially not clearing correctly?
Any tips on where to begin would be great, if someone wouldn't mind sharing their expertise with me.

Comments
Oh, I'd also like to add to
Oh, I'd also like to add to this that it seems at least once per day, my primary and secondary menu's dissapear. I've been going in, disabling one menu item, re-enabling it, and the problem is fixed. But that also seems pretty odd to me.
ending the fragmentation
Try increasing the allocated memory for APC, ideally to the point of ending the fragmentation.
I've increased it to 256MB of
I've increased it to 256MB of RAM, which I thought was quite a bit based on the examples I've seen. Higher still perhaps?
Is it possible that I'm
Is it possible that I'm having issues because I'm running out of shared memory? I have my shmmax settings to 256 as well as my apc memory to 256. Is it possible that I need to set the apc memory lower than the shmmax setting to avoid running out of shared memory?
Thanks for the input. I'm really new at this.
I have a somewhat unusual
I have a somewhat unusual situation (more than 400 vhosts on the box) so my configs are likely an edge case, but I have my apc.shm_size set to 768. I see a little bit of fragmentation, but it seems to be happy and stable for the week or more that I can usually make it before I have to bounce apache (for a new vhost or config change, not due to instability).
What version of APC are you on? There have been some improvements regarding fragmentation in recent versions (3.1.3, especially). Also, what is your apc.rfc1867_freq set to? If it's the default ("0"), your file uploads may be hammering the crap out of the cache with way too frequent updates.
When you say a "little bit of
When you say a "little bit of fragmentation", how many fragments are we talking about? Maybe I'm just being overly worried about a non-factor problem.
My apc.rfc1867_freq is set to zero currently. I guess I don't really understand that setting very well.
I have noticed that my anonymous users are blisteringly fast, but my authenticated users are still very slow.
edit: I'm on APC 3.0.19 because I'm a coward when it comes to running the compiler.
This problem has been
This problem has been resolved for me. It seems that no matter what I tried, the server I was running on just didn't have the memory to handle the caching I needed to do.
I upgraded to a new server with 4x the RAM and 4x the CPU for $5 a month more (I sure wish they offered that package when I started this site) and now it's screaming fast. Memcache runs great, APC has zero fragmentation, and life is good.
There are probably a few more things I could do to really speed things up, but we're talking about a 1million page view per month site here, not 1 million per day, so additional tweaking to shave a few ms off the load time probably isn't worth the additional effort.
Thanks for the help everyone.
What is your hosting
What is your hosting provider? You can PM me, if do not want to make advertisemesnt. Thank you in advance ;)
drupal+me: jeweler portfolio
I'm using Godaddy due to cost
I'm using Godaddy due to cost vs. performance.
that might explain
that might explain everything.
try a more solid provider.
Luís Pedro Algarvio
Drupal and DevOps Developer, Evangelist & Trainer
lp.algarvio.org
for example, with godaddy
for example, with godaddy shared hosting, the servers are hampered with lack of APC (something common, but not undoable in my opinion, since providers could require customers to set in on manually, hence less users actually using it).
if you select godaddy older shared hosting, still available, the server lags tremendously.
for the DB part, it's mediocre. typical small sites can run fast enough though.
for the web server part, either they are overselling too much, or their apache and php configuration just plain sucks, as it's tad slow.
for American users, i'd say try host gator. it doesn't seems bad and has a decent control panel (cpanel instead of godaddy limited hosting manager).
for European users, forget about renting any kind of server from godaddy in their US datacenter (texas?). You're way better off with the Euro center (germany?) (and vice-versa). The latencies and speeds are horrible between the continents.
on the other hand, for the price they provide, i don't know any comparable competitors in Europe (for shared hosting).
as for VPS and dedicated servers - the server specs are way way way LOW compared to other providers.
they rent you a fiat, when you can have a lamborghini for the same money somewhere else.
also, anywhere and everywhere i've searched, i only found bad reviews of their VPS and dedis.
i don't have much knowledge of good VPS/dedi providers (much less for Europe), but i can say safely that LayeredTech is a good one, albeit, expensive.
finally, to conclude bashing godaddy... their stock default settings for php, are really bad. as soon as you rent from them, you'll find yourself changing those. they even provide you an almost useless phpmyadmin interface, hampered by the 2MB upload limit!!! (which you can't override in your php.ini as it's located in another server) and constant logging out. It's also really outdated (2.6.x), to keep compatibility with PHP4. To resolve those issues, just install manually your phpmyadmin, on a per domain/site basis.
on the other hand, their support works and they do allow you to change a lot of settings on shared hosting (changeable at the php.ini level, which is great).
their domain service is also great, one of the best around with competitive prices.
but there's worse, like 1and1 (for both domains and hosting).
this comes from a previous customer of 1and1 VPS (US), LayeredTech dedi (US), Godaddy shared hosting (US); currently Godaddy shared hosting (EU) customer.
my complaint to the EU shared hosting server is mainly lack of APC. had i had enough money, i would go dedi all the way... but definitely not at godaddy :P
cheers
Luís Pedro Algarvio
Drupal and DevOps Developer, Evangelist & Trainer
lp.algarvio.org
My generic slate of
My generic slate of recommendations I give people in the U.S.:
Shared hosting - VexxHost. They aren't that well known, but they provide really solid hosting and great support. They also have nice added features like ffmpeg if you ever want video
VPS - Linode. I've never had a problem out of them. Very solid VPS'.
Cloud and Dedicated - Voxel. I can never stop singing the praises of Voxel. They have by far the most superior support and are always willing to work with people. On top of that you get the VoxCAST CDN when you host with them, and they author mod_cdn, which gives you rather painless CDN integration with any site. Oh and the Voxel people also have some decent Drupal experience to boot.
As far as GoDaddy, I can't tell you how many people I have taken off their servers over the years. They are notorious for pushing the limits when it comes to shared accounts per server.
HollyIT - Grab the Netbeans Drupal Development Tool at GitHub.
I echo your praises of Voxel.
I echo your praises of Voxel. I haven't had better experiences anywhere else.
However I strongly disagree with you about mod_cdn. I've attempted to use it about half a dozen times and I would describe it as alpha quality code. I've had nothing but problems. For painless pull-CDN integration I recommend the Parallel module - easy as pie.
--
Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his
I've used mod_cdn on a couple
I've used mod_cdn on a couple of Drupal sites without any problems. It definitely takes some tinkering to get working right though.
For performance parallel is a much better way to go. I actually bench marked the two back in the winter and saw a performance boost of almost 4X going the parallel route on dynamic pages. When I did it with Boost it was almost a 10x performance boost.
HollyIT - Grab the Netbeans Drupal Development Tool at GitHub.
Well, while i'm in
Well, while i'm in here,
Please some one point some good VPS / dedi hosts in Europe :D
language isn't a constraint unless it's an eastern country.
UK, Germany, France, Spain, Sweden, Norway, Netherlands, Switzerland, etc would be fine for me.
best price / quality factor. decent support, not extreme or non-existant.
not past 50€ for VPS and not past 150€ for dedi. that with proper hardware, not crappy Pentium III and Celerons...
to my knowledge, the best are in Sweden and other nordic countries.
i'm sure english customers will get along fine with them, with or without google translate ^^
thanks!
Luís Pedro Algarvio
Drupal and DevOps Developer, Evangelist & Trainer
lp.algarvio.org
check this one:
check this one: www.leaseweb.com
LeaseWeb is an Infrastructure as a Service Provider (IaaS) and operator of a first-class worldwide network. It has a network uptime of 99.999%, which currently offers its customers an available bandwidth of more than 900 Gbps. Services include dedicated servers, virtualization and cloud, colocation and tailor-made IT infrastructure solutions, as well as a complete suite of internet services to our customers, including: shared webhosting and domain name registration. As a prominent part of the Ocom Group , LeaseWeb has been helping its customers grow their business with state-of-the-art hosting solutions since 1997.
LeaseWeb's success is based on the philosophy of combining excellent product quality at affordable price points with a first-class network, together with a highly skilled engineering and technical support team. LeaseWeb's growing infrastructure currently spans four datacenters in the Amsterdam region, connecting with major telecom carriers. LeaseWeb peers with Internet exchanges in Amsterdam, London, Frankfurt, New York, Brussels, Copenhagen, Paris, Budapest, Bucharest, Warsaw, Prague, Bratislava, Milan, Vienna, Stockholm, Oslo, Zurich and Madrid.
LeaseWeb has an enviable record for developing global enterprise level hosting internet infrastructure for major corporations, requiring the best world class internet solutions.
http://www.leaseweb.com/en/dedicated-servers/configurator-custom-built#
Your configuration
Custom Built
Dell PowerEdge R210 € 63,00
1x Intel Quad Core X3430
4GB DDR3 € incl.
2x500GB SATA2 € 2,00
RAID1 (Mirror) € 0,00
IP: 5 € 4,00
2000 GB € 10,00
Monthly total € 79,00
One-off setup costs € 0,00
i was awed at the low prices for dedicated, specially custom built.
seems to not include service support unless specified.
their shared hosting is not cheap, and domain prices are moderate to low for the most common, except for cTLDs, which are ridiculously high
Luís Pedro Algarvio
Drupal and DevOps Developer, Evangelist & Trainer
lp.algarvio.org
okay....
okay.... nevermind:
http://www.webhostingstuff.com/review/LeaseWeb.html
is there a proper topic somewhere in drupal.org to discuss hosting? thanks
sorry for disrupting.
Luís Pedro Algarvio
Drupal and DevOps Developer, Evangelist & Trainer
lp.algarvio.org
Linode has servers in London
Linode has servers in London now.
OVH is big in Europe, also
OVH is big in Europe, also VPS.net or Rochenhosting.com (I like Rochen becausethey provide managed VPS for good money which can be used by customers without Linux knowledge)
Another Hosting Option
djudd,
Another approach to help solve your hosting issues is to find a hosting company you like to work with, then you could contract the performance tuning out to another consultant. Once APC, Apache, MySQL, and the PHP environment have been tuned properly, only the traffic to your site will be the deciding factor if you need to upgrade out of your VPS to dedicated hardware.
As for your APC issue, I ran into the same problem with fragmentation and blogged about it here:
http://blog.thetajoin.com/content/alternative-php-cache-apc-and-drupal-p...
There should be no need to restart Apache everyday to clear out APC.
I don't have any experience with hosting companies outside of the United States, so I can't be helpful there.
Mark Schoonover
http://www.thetajoin.com
High Performance Drupal Hosting & IT Services