Date: 03/30/00
- Next message: Stefan Ekman: "[PHPLIB] Bugs in template and cart (7.2b)"
- Previous message: Björn Schotte: "Re: [PHPLIB] Too long session.val with PHP4.0RC1"
- In reply to: Kristian Koehntopp: "Re: [PHPLIB] Re: [PHP3] persistent data"
- Next in thread: Kristian Koehntopp: "Re: [PHPLIB] Re: [PHP3] persistent data"
- Reply: Kristian Koehntopp: "Re: [PHPLIB] Re: [PHP3] persistent data"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Mar 30, 2000 at 08:59:12AM +0200, Kristian Koehntopp wrote:
> In netuse.lists.phplib you write:
> >Thanks! A good thing to know. Maybe we could balance the load
> >between mysql and CT_Shm and see which breaks first? Anyone
> >know of good ways to stress-test mysql and/or php? Could be
> >fun. ;-)
>
> Storing sessions in MySQL will effectively store them in server
> memory, unless you chose your MySQL buffer size near zero. Using
> MySQL adds some overhead due to context switches and
> interprocess communication, but if you connect using
> "localhost", MySQL will usually use a Unix Domain Socket or
> Windows Named Pipe instead of an TCP/IP Socket to communicate,
> which is much, much faster. On Linux, Unix Domain Socket speeds
> approach shared memory speed for small session sizes.
Well, the penalty for storing simple strings is still quite high.
Compare it to the files storage handler of PHP 4.0: It needs exactly
one system call to read or write the session data, plus an open(2)
at the beginning and a close(2) at the end. If your OS does not suck,
it will keep the data in its buffer cache.
Shared memory reduces the number of system calls even further, and
thus should be faster for keeping this kind of data around. Less
context switches, more speed.
- Sascha
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.
- Next message: Stefan Ekman: "[PHPLIB] Bugs in template and cart (7.2b)"
- Previous message: Björn Schotte: "Re: [PHPLIB] Too long session.val with PHP4.0RC1"
- In reply to: Kristian Koehntopp: "Re: [PHPLIB] Re: [PHP3] persistent data"
- Next in thread: Kristian Koehntopp: "Re: [PHPLIB] Re: [PHP3] persistent data"
- Reply: Kristian Koehntopp: "Re: [PHPLIB] Re: [PHP3] persistent data"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

