I feel that Memcached speed on my site is slower than Mysql queries. Take a look at the performance screenshot of my website I received from New Relic.

I do not know how to optimize memcached on my CentOS server. See Memcached Configuration and Performance Screenshots. I feel that the number of Total Connections is great.

Please see live stats below.

Below is an example of using memcached on my website
<?php
class dataCache {
function setMemData($key, $var, $flag = false, $expire = 36000) {
global $memcache;
if (!$memcache) {
$memcache = new Memcache;
$memcache->connect('localhost', 11211) or die("Could not connect");
}
if ($result = $memcache->set($key, $var, $flag, time() + $expire)) {
return TRUE;
} else {
return FALSE;
}
}
function getMemData($key) {
global $memcache;
if (!$memcache) {
$memcache = new Memcache;
$memcache->connect('localhost', 11211) or die("Could not connect");
}
if ($data = $memcache->get($key)) {
return $data;
} else {
return FALSE;
}
}
function delMemData($key) {
global $memcache;
if (!$memcache) {
$memcache = new Memcache;
$memcache->connect('localhost', 11211) or die("Could not connect");
}
if ($result = $memcache->delete($key)) {
return TRUE;
} else {
return FALSE;
}
}
}
And at the end of every PHP page, I use the following method to close the connection
if(isset($memcache)){
$memcache->close();
}
Do I need more memory for this server? How to reduce the number of connections? Any suggestions for improving performance?
-------------- EDIT ------------------------
, : 9. - 671731. .