Server and Hardware Configuration

Sascha Braun - CEO at Braun Networks sascha at braun-networks.com
Fri Jul 27 08:43:47 UTC 2007


I don't really now how many request at the same time are getting
made, I looked at it in the way, you prescribed it to me. Which
means that I started memcached from the commandline with the -vv
parameter.

It looked like that I did a couple of hundreds per page load, be-
cause every single screentext is getting looked up, in the mysql
database normaly.

I can show you the script, I acutally use to intialize memcache
its only consisting on very simple tasks to do.

I wanted to write a fallback solution, but at the moment I want
to spare the time. Rather want to have it to work.

As I am using exactly the same memcached installation localy, with
exactly the same application framework, but with the difference, that
the application runs on a 1600 Mhz Centrino Notebook Harddrive, but
with 2 GB of Ram, nothing happens strange. Memcache does exactly
what it should. So I am pretty sure about, that it must hang together
with me memory, as there is a dbmail server, with MailScanner and
Clamav, running on my pico webserver, and as well my apache, mysql
and postfix does they're work on that little root server.

I am sure, that I first have to upgrade my server system, before
my websites will be able to run reliable.

public function memcache($pointer, $data="", $class="", $compress="",
$timeout="0")
// store or load data from the memcache
{
	if (MEMCACHE_SUPPORT == 'true') {
	    	$memcached_port = $_SESSION['memcache_port'];
			if (empty($memcached_port)) { $memcached_port = 'XXXXX'; }
	    	$memcache = memcache_connect('localhost', $memcached_port);
	    	if ($memcache) {
	    		$cache = $memcache -> get(PROJECT.$pointer);
	    		if (!$cache && empty($class)) {
	    			$memcache->set(PROJECT.$pointer, $data);
	    			$cache = $memcache -> get(PROJECT.$pointer);
	    		} elseif (!$cache) { 
	    			$object = new $class;
					$memcache->set(PROJECT.$pointer, $object);
					$cache = $memcache -> get(PROJECT.$pointer);
	    		}
	    		return $cache;
	    	}
    	}
		if (empty($class)) {
    		$cache = $data;
		} else {
    		$cache = new $class;
		}
		return $cache;
    }
    
    public function memcache_delete($pointer) {
		
		if (MEMCACHE_SUPPORT == 'true') {
			$memcached_port = $_SESSION['memcache_port'];
			if (empty($memcached_port)) { $memcached_port = '35876'; }
			$memcache = memcache_connect('localhost', $memcached_port);
	    	if ($memcache) {
	    		$memcache -> delete($pointer);	
	    	}
		}
	}

Am Donnerstag, den 26.07.2007, 16:39 -0700 schrieb Dustin Sallings:
> On Jul 26, 2007, at 11:35 , Sascha Braun - CEO @ Braun Networks wrote:
> 
> > How many request at the same time can memcached handle?
> 
> 	How many have you configured it to handle?  Is it reporting that  
> it's out of connections?
> 
> > All my screentexts are getting loaded from memcached as well
> > as all configuration files and datasets.
> >
> > Mediadata I left out, this time :))
> >
> > Every page is consisting of a couple if hundreds requests.
> 
> 	Are they individual requests?  If so, are you reusing connections?   
> If not, are you closing connections?  How much concurrency do you  
> have in your app?
> 



More information about the memcached mailing list