Port multiplexing technology, this can be a good solution to the problem of surprise group and stream_socket_server performance bottlenecks.
/*** Multi-process IO multiplexing libevent* Handle multiple connections at the same time* Port
Install the Memcache server in Linux. In linux, memcache server installation server is mainly to install memcache server, the latest version is memcached-1.3.0. Download: install the memcache server in www. danga. commemcacheddistme linux.
The
PHP uses PCNTL and libevent to implement the timer function, first look at the example, Pcntl (PHP thread) explained below.
Copy CodeThe code is as follows:
function NewChild ($func _name) {
echo "Enter newchild\n";
$args = Func_get_args
PHP uses PCNTL and libevent to implement the timer function, first look at the example, Pcntl (PHP thread) explained below.
0) {echo "Master process exit\n"; }
PHP extension Pcntl implements "multithreading" (process)Pcntl and TicksTicks is
1, to use Libevent first need to install, install address http://libevent.org/, I chose the 1.4 stable version of the installation process is a common Linux installation of 3 steps only 2, before using libevent, it is necessary to know the model of
php5+php-frm+libevent+memcached Why this environment can be resolved. php
No Apache, no nginx,php files are run in the browser by what .... Is it php-fpm?
------Solution--------------------
What system? How do you know? PHP-FPM seems to be a
is located in code event-internal.h.Event_base a collection of similar events, you create an event and you must specify a collection for the event.struct Event_base {The const struct EVENTOP *evsel; /*evsel and Evbase on the relationship between the
PHP uses PCNTL and libevent to implement the timer function, first look at the example, Pcntl (PHP thread) explained below.
Copy Code code as follows:
function newchild ($func _name) {
echo "Enter newchild\n";
$args = Func_get_args ();
Reprint Please specify Source: http://blog.csdn.net/luotuo44/article/details/39325447
Lock Operation:
In the previous blog post you can see that many functions need to lock the evbuffer before operation. Unlike Event_base, if the evbuffer supports
memcached Installation
1. Download, memcached need to install first libeventMemcached's download Address: Http://www.danga.com/memcached/dist/memcached-1.2.6.tar.gzs
Http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz Latest
Server side is mainly installed Memcache server side.Download: http://www.danga.com/memcached/dist/memcached-1.2.2.tar.gzIn addition, Memcache used the libevent this library for socket processing, so you also need to install the latest version of
Perform#/usr/local/memcached/bin/memcachedThe following error is then shown:./memcached:error while loading shared libraries:libevent-2.0.so.5:cannot open Shared object file:no such file or dire CtoryCan't find the Libevent-2.0.so.5 fileHere's how
FastDFS Distributed File System installation and configuration-a single Server version installation environment and its configuration directory a Server integrates a Tracker Server + two Storage Server1 environment IP: 192.168.127.62Tracker Server
Install Memcached and linuxmemcached on Linux.
Download and install the Memcache ServerThe server is mainly used to install the memcache server.Download: http://www.danga.com/memcached/dist/memcached-1.2.2.tar.gzIn addition, Memcache uses the
Document directory
Windows Installation
Linux Installation
Install memcached
Start memcached
Stop memcached (locate the process and kill the process)
1. Add
2. Delete
1. Get
2. Gets
3. CAS
1. Stats
2. Stats items
3. Stats cachedump
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.