Re: Shared memory - to use or not to use?
| From: | Chris Adams | Date: | Wed, 28 Jun 2000 20:57:33 +0000 |
| Subject: | Re: Shared memory - to use or not to use? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-3662@lists.php.net to get a copy of this message | ||
> Which of these would be fastest? The shared memory option seems most
> logical to me, but then it seems that I'd have to take on a lot of
> responsibility for managing the locations of the values (some sort of
Shared memory would probably be fastest but you've got to a lot of work by hand. You might find
interesting the session handler someone posted here awhile back that used shared memory to keep
track of the session data, since that was also retrieving keyed values.
However, you're really not talking about inordinately high traffic volumes on the server with
decent
hardware. I think you'd find the MySQL approach would be much easier to develop and manage and,
assuming a sane way of picking ads, I think you'd find that a query would take a few
thousandths of
a second. The big catch is that "sane way of picking ads" and actually sending the ad
data. If
you've got a reasonable number of ads, you might want to store the actual image data in shared
memory along with everything you'd need to compute that can't be done quickly.