MemCacheD slower than calling MySQL?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gilles Ganault

    MemCacheD slower than calling MySQL?

    Hello

    A friend of mine is running a site that has about 1,000 concurrent
    users when it's really busy. Until now, he kept data in sessions
    (including output from SELECT fetched from a remote MySQL server), but
    since most data is the same across users, he tried MemCacheD... but
    performance is worse than calling MySQL again and again and using a
    lot of RAM to keep this into sessions.

    Do you know of other ways to share data across users? What about
    shared memory?

    Thanks for any tip.
  • Jerry Stuckle

    #2
    Re: MemCacheD slower than calling MySQL?

    Gilles Ganault wrote:
    Hello
    >
    A friend of mine is running a site that has about 1,000 concurrent
    users when it's really busy. Until now, he kept data in sessions
    (including output from SELECT fetched from a remote MySQL server), but
    since most data is the same across users, he tried MemCacheD... but
    performance is worse than calling MySQL again and again and using a
    lot of RAM to keep this into sessions.
    >
    Do you know of other ways to share data across users? What about
    shared memory?
    >
    Thanks for any tip.
    >
    You could use shared memory. But I'd just keep using MySQL. Data
    that's that commonly used will be in the cache, anyway.

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • Norman Peelman

      #3
      Re: MemCacheD slower than calling MySQL?

      Gilles Ganault wrote:
      Hello
      >
      A friend of mine is running a site that has about 1,000 concurrent
      users when it's really busy. Until now, he kept data in sessions
      (including output from SELECT fetched from a remote MySQL server), but
      since most data is the same across users, he tried MemCacheD... but
      performance is worse than calling MySQL again and again and using a
      lot of RAM to keep this into sessions.
      >
      Do you know of other ways to share data across users? What about
      shared memory?
      >
      Thanks for any tip.
      Your friend could try APC (Alternative PHP Cache) instead and/or tune
      MySQL with a larger query cache. MySQL won't go to disk for queries it's
      already performed if they are in the cache.

      --
      Norman
      Registered Linux user #461062
      -Have you been to www.php.net yet?-

      Comment

      • C. (http://symcbean.blogspot.com/)

        #4
        Re: MemCacheD slower than calling MySQL?

        On 5 Sep, 21:06, Gilles Ganault <nos...@nospam. comwrote:
        Hello
        >
        A friend of mine is running a site that has about 1,000 concurrent
        users when it's really busy. Until now, he kept data in sessions
        (including output from SELECT fetched from a remote MySQL server), but
        since most data is the same across users, he tried MemCacheD... but
        performance is worse than calling MySQL again and again and using a
        lot of RAM to keep this into sessions.
        >
        Do you know of other ways to share data across users? What about
        shared memory?
        >
        Thanks for any tip.
        This is not what sessions are for: to share data between users you
        need .... a database. To do it quickly, you need.....MySQL.

        I'd start by doing a normal performance analysis/optimization:

        1) make sure you're content is being sent with the right caching
        advice
        2) isolate the long queries and refactor the database
        3) make sure you're using a PHP accelerator
        4) make sure you're using compression on HTTP (although I've heard
        some people claim its slowing them down - YMMV - experiment)
        5) identify and eliminate bottlenecks (e.g. moving the DBMS to the
        same box as the webserver, distributing I/O evenly across disks, make
        sure you've got plenty of free memory)

        C.

        Comment

        Working...