Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70121 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43323 invoked from network); 14 Nov 2013 19:43:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Nov 2013 19:43:32 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.50 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.50 mail-la0-f50.google.com Received: from [209.85.215.50] ([209.85.215.50:53543] helo=mail-la0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C7/60-40965-2E725825 for ; Thu, 14 Nov 2013 14:43:31 -0500 Received: by mail-la0-f50.google.com with SMTP id el20so2004331lab.9 for ; Thu, 14 Nov 2013 11:43:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=b42k0ygxH1vocIdzq0FU7TWhi6Y5tIKxSoP/kCaqO4I=; b=WaU8U4RyxjmHK+sPwYvByOQH/w8q8blRIxKNeMP3Iy67lTfaS0bd3/Zr966HI/32pt IL/YOxjraR9Ptu8uMetAlrgtxT/WhD8gZ+S5HI0/swchWq+gTN8kLPLz0NWQAhLUWh1x YO1U9544TZtyVEx4NGqWtrAdPL06bnCwhryPg8fXstteFFxS++LR8xiZw/cfIoNPUx3z bgv1qAwtoS/aaxgICq4LnYYiEAf8GsulYFgieSAlO6+TOcfUW55RKlMeFRD+ADw57Oba d59VR/OI3al+qEx6A2/rH+OWhYLuwzcOcKVXCVpgMkgQZVnK3MXFns1BczuDcDPq7t2A d11g== X-Received: by 10.152.140.193 with SMTP id ri1mr1870930lab.18.1384458207737; Thu, 14 Nov 2013 11:43:27 -0800 (PST) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.154.201 with HTTP; Thu, 14 Nov 2013 11:42:47 -0800 (PST) Date: Fri, 15 Nov 2013 04:42:47 +0900 X-Google-Sender-Auth: 45Hwvy_E-2suFGJdG1N8yNdjjZQ Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1133b05eadbda804eb284bca Subject: Session cache, lock and write From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1133b05eadbda804eb284bca Content-Type: text/plain; charset=UTF-8 Hi all, Session module can be faster in several ways. It can ignore writing session data when session data is not changed. It also can remove reading session data by caching as most web servers support keep alive. Current session save handlers lock session data, but it could be unlocked. There are many applications that transnational consistency of session data is not mandatory. Session module could have ini settings - session.read_cache = int (by default 0 = no cache. 5 for 5 seconds) Read cache will be updated if session data has changed. - session.lock = On/Off (On by default. Some save handlers already have this) - session.write_short_circuit = On/Off (Off by default) Users may verify save handler feature by viewing phpinfo() and source code level compatibility will be kept. These features boost web application performance a lot by ignoring session data consistency. It's just like transnational vs. non-transnational SQL. session.read_cache and session.lock may be consolidated since enabling session.read_cache disables session.lock. There are slight difference between them but it may be ignored. (With session.lock=On, writes from other web server(PHP) can be blocked even when session.read_cache=5, but reading session cache on the same keep alive session will not be blocked, for example.) Any comments? Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a1133b05eadbda804eb284bca--