As an excellent out-of-process cache, Memcache is often used in high concurrency system architectures. Here to talk about how to use the Telnet tool to view the Memcache health and its key management maintenance. Suppose memcache installation directory:/usr/local/memcached
1, start memcache
Copy Code code as follows:
[Root@localhost ~]#/usr/local/memcached/bin/memcached-d-M 512-u root-l 192.168.119.70-p 12000-c 512-p/usr/local/ Memca
Memcache implementation data storage
The so-called client installation means PHP (or other programs, memcache and other good API interface) to use the server-side memcache provided functions, the need for PHP to add extensions.
PHP's Memcache
Copy Code code as follows:
Connection
$mem = new Memcache;
$mem->connect ("192.168.0.200", 12000);
Save data
$mem->set (' key1 ', ' This is ', ' 0, 60 ');
$val = $mem->get (' Key1 ');
ec
, The branch or head Office client accesses the IQ database data directly through the application server.
Project results
Customer integrated information System, the current database data storage more than 100GB, the total number of users 12000, the average number of online users 260 people, the daily incremental load of 3GB, data processing time of 30-60 minutes, the annual new data storage about 300G.
The overall efficiency of the system has also
you want to optimize the keyword, home page results described in the following with the word "promotion" are participating in the auction site, statistics of their number, most generally 10, five grades: A (none), B (1-3), C (3-6), D (6-9), E (more than 9).
Then the statistics record under the five indicators of a single keyword, respectively, which grade (such as: ABDEC), if the overall coefficient is partial a, the optimization difficulty belongs to the small, the price range generally in 30
Label:Looking at the blog of the Big V in the garden, I found that the text was a description of the problem as described in the title.The specific question describes my explanation through the blog of the Hermit:Note: If the above interception is infringing, please also inform the author, thank you again. When I see this problem, I think of the solution that is related to the cumulative rollup provided by the window function. To prepare the test data, the T-SQL code is as follows:1 IF object_id
will reduce the query efficiency of the database. Syntax: CreateIndex index name on table ( field name 1,[ field name 2]) Category: Single row index: one column Federated index: More than two columns of index
Issue 1: Indexing on the hiredate of the EMP table Idx_h
Select*from scott.emp where hiredate > To_date (' 1981-01-01 ', ' yyyy-mm-dd ')
Issue 2: function cannot be used in an indexed field
Select*from scott.emp where To_char (hiredate, ' yyyy ')
root 140179 11?? 17:39/usr/local/bin/memcached-debugStart the Memcache serviceTo start the memcached service:1. Start the server side of the memcache:#/usr/local/bin/memcached-d-M 8096-u root-l 192.168.77.105-p 12000-c 256-p/tmp/memcached.pidThe-D option is to start a daemon,-M is the amount of memory allocated to Memcache, in megabytes, I'm 8096MB,-U is the user running memcache, I am root here,-L is the server IP address of the listener, if there a
# make Install# Vim/usr/local/php5.6/etc/php.iniExtension_dir = "/usr/local/php5.6/lib/php/extensions/no-debug-non-zts-20131226/"Extension=memcache.so* Basic settings for memcached1) Start the server side of the Memcache#/usr/local/bin/memcached-d-M 100-u root-l 127.0.0.1-p 12000-c 300-p/tmp/mem cached.pidThe-D option is to start a daemon,-M is the amount of memory allocated to Memcache, in megabytes, I'm 10MB,-U is the user running memcache, I am roo
-dirMakeMake install
3. A message similar to this will appear after the above installation:
Installing shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-2007xxxx/
4. Modify extension_dir = "./" in php. ini
Extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-2007xxxx /"
5. Add a row to load the memcache extension: extension = memcache. so
Basic settings of memcached:1. Start the Memcache Server:#/Usr/local/bin/memcached-d-m 10-u root-l 192.168.0.200-p
the recognition characteristics of a single picture
Using SVM training model to train the signature file of the tag, get the model file
12 Material PreparationThis article re-downloads the same pattern of 4 numbers in the training phase of the verification picture total: 3000 photos. The 3000 images are then processed and cut to get 12000 atomic images.In these 12000 images remove some of the inte
information are output to console-F to specify the growth factor. The LRU is disabled by default in 1.25-M. After the memory is exhausted, the maximum number of concurrent connections in error-C is returned, by default, 1024-u specifies the username (only when the root process is started).-P specifies the PID file path, for example, to start memcache with a daemon process. /memcached-D-M 10-u root-l 127.0.0.1-P 12000-C 256-P/tmp/memcached. PID
2. Con
HDD
~140 iops[2]
sas
15,000 rpm SAS drives
HDD
~175-210 IOPS[2]
Sas
3, the specific business system read and write ratioSecond, the case1) Business requirements: 10TB FC 15K rpm storage space, meet 6000 IOPS, calculate RAID5,RAID10 How many hard drives are required? First you need to know the percentage of read and write operations in I/O. Assume 6000 iops read / write ratio is 2 : 1 The actual IOPS load f
-called client installation refers to PHP (or other programs, memcache and other good API interface) to use the server-side memcache provided functions, PHP needs to add extensions.
PHP's Memcache
Connect ("db.bkjia.com", 12000);//Save Data $mem->set (' Key1 ', ' This is first value ', 0, $); $val = $mem->get (' Key1 '); echo "Get Key1 value:". $val. "";//Replace Data $mem->replace (' Key1 ', ' This is replace value ', 0, $); $val = $mem->get ('
The following is a simple PHP project distributed deployment, session synchronization of one of the scenarios, using Memcache to store the session. And summed up three ways to configure, the need for friends can refer to the following
1, directly modify the php.ini configuration file
The code is as follows:
Session.save_handler = memcache//Set session is stored in Memcache
Memcache.hash_strategy = "consistent"//set Memcache hash algorithm
Session.save_path = "tcp://127.0.0.100:11211"//Set Sess
implement data storageThe so-called client installation refers to PHP tutorials (or other programs, memcache and other good API interface) to use the server-side memcache provided functions, PHP needs to add extensions.
PHP's Memcache
Copy the code code as follows:Connection
$mem = new Memcache;
$mem->connect ("192.168.0.200", 12000);
Save data
$mem->set (' key1 ', ' This is first value ', 0, 60);
$val = $mem->get (' Key1 ');
echo
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.