Thanks all for your replies, Les : Thanks for clarifying that memcached would access data as client/ server thru sockets.
There is 8 GB RAM on the server, and on first access apache bench doesn't show any failed requests, but if I execute the program again, I see that number of failed request show up, this is something that I couldn't understand as why didn't the number of failed request show on the first run and then appears every subsequent run (Total request for each run : 10,000 and 200 cc). "Perhaps with memcached running you don't have enough memory to ...". this is not the case in any which ways, have checked the memory and had that been an issue even file IO would have more or less given me the same performance. Brian: if there is lot of file IO it certainly would become a bottle neck, but let say I have sufficient ram to hold most of the files in file cache, memcached would still not give me any better results as I am getting now. You may be right in pointing the overheads involved related to network, but even FS does have some overheads like for every read finding out if the file changed. Moreover, had filesystem managing cache made such a big difference, why do I have fluctuations in number of Requests/Sec while benchmarking the script that uses file I/O. The fluctuations has been as high as 30% in some tests. memcached works in threaded mode as recommended in docs (1 thread per cpu core), in my case its 2. Yes I am very much interested in knowing in depth about fine tuning memcached. "If your file based approach works.." cuz I don't want to stop working on optimization just because something works, and as you have mentioned about fine tuning memcached I still have not been able to achieve that, how can I say FS approach works better for me. Henrik: I am sorry for the term I used 'Local Machine", I am using a server on EC2 and I run my tests from another server on EC2. And also, I am not planning to use memcached on local machine. Dustin: I couldn't figure out where I was going wrong, and that's the reason I would like you guys to help me find out. Jay: 3.If you write a test script with a bunch of arbitrary sets and then gets of the same keys, do they fail? didn't try this, but what are we trying to achieve out of this exercise? In my script I need to invalidate cache once every 15 mins and then only get when this goes on production. Ved