By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,303 Members | 1,245 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,303 IT Pros & Developers. It's quick & easy.

MemCacheD slower than calling MySQL?

P: n/a
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.
Sep 5 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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.
js*******@attglobal.net
==================

Sep 6 '08 #2

P: n/a
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?-
Sep 6 '08 #3

P: n/a
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.
Sep 6 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.