Hi Dormando! I try both BASH and PHP but result is the same. Here is my code:
*Bash:* *#!/bin/bash memc_src=«127.0.0.1 11211» memc_keys_values_file="/tmp/memcached.keys-values" IFS=" " while read key value do val_len=$(expr length $value) echo -e «add $key 0 2592000 $val_len\r\n$value\r» | nc $memc_src >> /dev/null done < "$memc_keys_values_file"* *PHP:* *<?php $memc_keys_file = "/tmp/memcached.keys-values"; $m = new Memcached(); $m->addServer('127.0.0.1', 11211); $file_handle = fopen($memc_keys_file, «r»); while (!feof($file_handle)) { $line = fgets($file_handle); $array = explode ( ' ', $line ); $val = substr_replace($array[1] ,"",-1); $m->set($array[0], $val, time() + 345600); usleep(1000); } ?>* * * Thanks for your help! * * On Friday, March 29, 2013 10:21:00 AM UTC+2, Dormando wrote: > > Can you post your test code? > > On Thu, 28 Mar 2013, Oleksandr Drach wrote: > > > Hello memcacheders! > > I am trying to make mass set/add operation from file using bash/php > against memcached server v 1.4.13. > > It starts normally but reaching ~1000 items (~200KB) I am�seeing that > script operations continues while number of memcached items still remains > ~1000! > > I use memcache-top and my own script to measure memcached items count. > > > > Outputs: > > STAT curr_items 1009 � > > > > � > > All keys/values are unique in �input file. > > I have tried to add delays between adds/sets but it still does not help! > > > > Server flags: > > /usr/bin/memcached -v -m 2048 -p 11211 -u memcache -c 16384 > > > > So my questions are: > > 1. What am I doing wrong? > > 2. How to import all of the data from file to memcached? > > > > Thanks in advance! > > > > -- > > � > > --- > > You received this message because you are subscribed to the Google > Groups "memcached" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to memcached+...@googlegroups.com <javascript:>. > > For more options, visit https://groups.google.com/groups/opt_out. > > � > > � > > > > -- --- You received this message because you are subscribed to the Google Groups "memcached" group. To unsubscribe from this group and stop receiving emails from it, send an email to memcached+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.