Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 460331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:51:46+00:00 2026-05-12T22:51:46+00:00

I own a community website of about 12.000 users (write heavy), 100 concurrent users

  • 0

I own a community website of about 12.000 users (write heavy), 100 concurrent users max on a single VPS with 1Gb ram. The load rarely goes above 3 and response is quite good.

Currently a simple file cache is used to store DB query results to ease the load on the DB, but the website still can slow down over 220 concurrent users (load test).

How can I find out what the bottleneck is?

I assume that DB is fine as cache is working fine, however Disk IO could cause problem. Each pageload has about 10 includes and 10-20 querys from DB or from the file cache, plus lots of php processing.

I tried using memcache instead of the file cache, but to my suprise the load test seemed to like file cache more.

I plan to use Alternative PHP Cache, but I still don’t really understand how that cache is invalidated. I have a singe index.php that handles all requests. Will the cache store the result for each individual request? Will it clear the cache automatically if one of my includes (or query result from cache) change?

Any other suggestions for finding bottlenecks (tried xdebug)?

Thanks,
Hamlet

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T22:51:47+00:00Added an answer on May 12, 2026 at 10:51 pm

    I plan to use Alternative PHP Cache,
    but I still don’t really understand
    how that cache is invalidated. I have
    a singe index.php that handles all
    requests. Will the cache store the
    result for each individual request?
    Will it clear the cache automatically
    if one of my includes (or query result
    from cache) change?

    APC doesn’t cache output. It caches your compiled bytecode.

    Essentially, a normal PHP request looks like this:

    1. PHP files are parsed and compiled to bytecode
    2. The PHP interpreter executes the bytecode

    APC caches the result of the first step, so you aren’t reparsing/recompiling the same code over and over again. By default, it still stat()s your PHP files on every request, to see if the file has been modified since its cached copy was compiled — so any changes to your code will automatically invalidate the cached copy.

    You can also use APC much like you’d use memcached, for storing arbitrary user data. Keep in mind, however:

    1. A memcached server can serve data to multiple servers; data cached in APC can only really be used locally. Better to serve a gig of data from one memcached box to four servers, than to have 4 copies of that gig of data in APC on each individual server.
    2. Memcached, in my experience, is better at handling large numbers of concurrent writes to a single cache key.
    3. APC doesn’t seem to cope very well with its cache filling up. Fragmentation increases, and performance drops.

    Also, beware: unless you’ve set up some sort of locking mechanism, your file-based cache is likely to become corrupt due to simultaneous writes. If you have implemented locking, that may become a bottleneck of its own. IMO, concurrency is tricky — let memcached/APC/the database deal with it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to write my own music streaming web application for my personal use
I'm building a small local social good community website where every project has his
I want to rewrite a complete community website in nodejs,express and nowjs with mongodb.
I've just moved over from my own MVC framework to a community supported one
I'd like to be able to allow community members to supply their own javascript
I would like to create a skill tree for my own and a community
I run a local business community website and I think it would be great
Community Wiki I don't care about the reputation points, I just want good answers.
I'm running my own LAMP server locally. Something i need to setup? Should it
can I make my own headers in HTTP request ? e.g. This is normal

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.