Re: Slow network writes
It's in the src distro http://cassandra.apache.org/download/ Aaron On 3/02/2011, at 12:27 PM, buddhasystem wrote: Never mind, I found it in SVN... (not in gz) Thanks. -- View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Slow-network-writes-tp5985757p5986949.html Sent from the cassandra-u...@incubator.apache.org mailing list archive at Nabble.com.
Re: Slow network writes
Unsubscribe, please. On Feb 2, 2011, at 4:27 PM, buddhasystem potek...@bnl.gov wrote: Never mind, I found it in SVN... (not in gz) Thanks. -- View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Slow-network-writes-tp5985757p5986949.html Sent from the cassandra-u...@incubator.apache.org mailing list archive at Nabble.com.
Re: Slow network writes
Dude, are you asking me to unsubscribe? -- View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Slow-network-writes-tp5985757p5991488.html Sent from the cassandra-u...@incubator.apache.org mailing list archive at Nabble.com.
Re: Slow network writes
I think that was originally a voice command - for whoever happened to hear it first :-) On Fri, Feb 4, 2011 at 9:57 AM, buddhasystem potek...@bnl.gov wrote: Dude, are you asking me to unsubscribe? -- View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Slow-network-writes-tp5985757p5991488.html Sent from the cassandra-u...@incubator.apache.org mailing list archive at Nabble.com.
Re: Slow network writes
You need to use multiple threads to measure throughput. I strongly recommend starting with contrib/stress from the source distribution, which is multithreaded out of the box. On Wed, Feb 2, 2011 at 9:43 AM, ruslan usifov ruslan.usi...@gmail.com wrote: Hello I try make little cluster of 2 cassandra (0.7.0) nodes and I make little test in php: ?php define(LIBPATH, lib/); define(RECORDSSETCOUNT, 100); require_once(thrift/Thrift.php); require_once(thrift/transport/TSocket.php); require_once(thrift/transport/TFramedTransport.php); require_once(thrift/protocol/TBinaryProtocol.php); require_once(LIBPATH.cassandra/Cassandra.php); require_once(LIBPATH.cassandra/cassandra_types.php); //- $transport = new TFramedTransport(new TSocket(10.24.84.4, 9160)); $protocol = new TBinaryProtocolAccelerated($transport); $client = new CassandraClient($protocol); $transport-open(); $client-set_keyspace(test); //- $l_row = array(qw = 12, as = 67, df = df, id = uid, uid = 1212); $l_begin = microtime(true); for($i=0; $i 100; ++$i) { $l_columns = array(); foreach($l_row as $l_key = $l_value) { $l_columns[] = new cassandra_Column(array(name = $l_key, value = $l_value, timestamp = time())); }; $l_supercolumn = new cassandra_SuperColumn(array(name = $l_row[id], columns = $l_columns)); $l_c_or_sc = new cassandra_ColumnOrSuperColumn(array(super_column = $l_supercolumn)); $l_mutation = new cassandra_Mutation(array(column_or_supercolumn = $l_c_or_sc)); $client-batch_mutate(array($l_row[uid] = array('adsdfsdfsd' = array($l_mutation))), cassandra_ConsistencyLevel::ONE); if($i !($i % 1000)) { print (microtime(true) - $l_begin).\n; $l_begin = microtime(true); }; }; print done\n; sleep(20); ? When i run this test on the same machine that run cassandra daemon with ip(10.24.84.4) i got foolow results: 0.64255094528198 0.53704404830933 0.4430079460144 0.43299198150635 But when i switch test on the other cassandra daemon with ip(10.24.84.7), so test and cassandra daemon work on separates machines i got follow results: 2.4974539279938 2.3667190074921 2.2672221660614 2.3015670776367 2.2397489547729 So in my case performance degrade up to 5 times. Why this happens, and how can i solve this? Latency of my network is good, ping give: PING 10.24.84.7 (10.24.84.7) 56(84) bytes of data. 64 bytes from 10.24.84.7: icmp_seq=1 ttl=64 time=0.758 ms 64 bytes from 10.24.84.7: icmp_seq=2 ttl=64 time=0.696 ms 64 bytes from 10.24.84.7: icmp_seq=3 ttl=64 time=0.687 ms 64 bytes from 10.24.84.7: icmp_seq=4 ttl=64 time=0.735 ms 64 bytes from 10.24.84.7: icmp_seq=5 ttl=64 time=0.689 ms 64 bytes from 10.24.84.7: icmp_seq=6 ttl=64 time=0.631 ms ^V64 bytes from 10.24.84.7: icmp_seq=7 ttl=64 time=0.379 ms PS: my system is Linux 2.6.32-311-ec2 #23-Ubuntu SMP Thu Dec 2 11:14:35 UTC 2010 x86_64 GNU/Linux -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of DataStax, the source for professional Cassandra support http://www.datastax.com
Re: Slow network writes
Is it possible that the key 1212 maps to the first node? I am assuming RF=1. You could try random keys to test this theory... Oleg
Re: Slow network writes
2011/2/3 Oleg Proudnikov ol...@cloudorange.com Is it possible that the key 1212 maps to the first node? I am assuming RF=1. You could try random keys to test this theory... Yes you right 1212 goes to first node. I distribute tokens like described in Operations: http://wiki.apache.org/cassandra/Operations: 0 85070591730234615865843651857942052864 So delay in my second experiment(where i got big delay in insert), appear as result of delay communications between nodes?
Re: Slow network writes
ruslan usifov ruslan.usifov at gmail.com writes: 2011/2/3 Oleg Proudnikov olegp at cloudorange.com Is it possible that the key 1212 maps to the first node? I am assuming RF=1. You could try random keys to test this theory... Yes you right 1212 goes to first node. I distribute tokens like described in Operations: http://wiki.apache.org/cassandra/Operations:085070591730234615865843651857942052864So delay in my second experiment(where i got big delay in insert), appear as result of delay communications between nodes? That was the theory, assuming you are using replication factor of 1. It is difficult to say where the key falls just by looking at the ring - random partitioner could through this key on either node. After writing 1 million rows you could actually see some SSTables in data directory on one node and none on the other.
Re: Slow network writes
Jonathan, where do I find that contrib/stress? Maxim -- View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Slow-network-writes-tp5985757p5986937.html Sent from the cassandra-u...@incubator.apache.org mailing list archive at Nabble.com.
Re: Slow network writes
2011/2/3 Oleg Proudnikov ol...@cloudorange.com ruslan usifov ruslan.usifov at gmail.com writes: 2011/2/3 Oleg Proudnikov olegp at cloudorange.com Is it possible that the key 1212 maps to the first node? I am assuming RF=1. You could try random keys to test this theory... Yes you right 1212 goes to first node. I distribute tokens like described in Operations: http://wiki.apache.org/cassandra/Operations:085070591730234615865843651857942052864So delay in my second experiment(where i got big delay in insert), appear as result of delay communications between nodes? That was the theory, assuming you are using replication factor of 1. It is difficult to say where the key falls just by looking at the ring - random partitioner could through this key on either node. After writing 1 million rows Hm this is very simple to calculate for random, partitioner, this script on python do that: from hashlib import md5; def tokens(nodes): l_retval = []; for x in xrange(nodes): l_retval.append(2 ** 127 / nodes * x); return l_retval; def wherekey(key, orderednodetokens): l_m = md5(); l_m.update(key); l_keytoken = long(l_m.hexdigest(), 16); l_found = False; l_i = 0; for l_nodetoken in orderednodetokens: if l_keytoken = l_nodetoken: l_found = True; break; l_i += 1; if l_found: return l_i; return 0; ring = tokens(2); print wherekey(1212, ring); So for key 1212 will by chosen 0 node. 10.24.84.4 in my case