cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias L. Jugel" <...@thinkberg.com>
Subject Re: Running out of heap
Date Wed, 22 Sep 2010 07:38:30 GMT
We had similar problems. It may help to read this: 
http://blog.mikiobraun.de/ (Tuning GC for Cassandra)

Regards,

Leo.

On 22.09.2010, at 09:27, Chris Jansen wrote:

> Hi all,
>  
> I have written a test application that does a write, read and delete on one of the sample
column families that ship with Cassandra, and for some reason when I leave it going for an
extended period of time I see Cassandra crash with out of heap exceptions. I don’t understand
why this should be as I am deleting the data almost as soon as I have read it.
>  
> Also I am seeing the data files grow for Keyspace1, again with apparently no reason as
I am deleting the data as I read it, which eventually causes the disk space to completely
fill up.
>  
> How can this be, am I using Cassandra in the wrong way or is this a bug?
>  
> Any help or advice would be greatly appreciated.
>  
> Thanks in advance,
>  
> Chris
>  
>  
> PS To give a better idea of what I am doing I’ve included some of the source from my
Java test app, typically I have 20 threads running in parallel performing this operation:
>  
>                 while(true)
>                 {
>                     long startTime = System.currentTimeMillis();
>                     key = UUID.randomUUID().toString();
>                     long timestamp = System.currentTimeMillis();
>                     ColumnPath colPathFdl = new ColumnPath(columnFamily);
>                     colPathFdl.setColumn(("345345345354"+key).getBytes(UTF8));
>  
>                     boolean broken = true;
>  
>                     while(broken)
>                     {
>                         try
>                         {
>                             client.insert(keyspace, key, colPathFdl, getBytesFromFile(new
File("/opt/java/apache-cassandra/conf/storage-conf.xml")),timestamp, ConsistencyLevel.QUORUM);
>                             broken = false;
>                         }
>                         catch(Exception e)
>                         {
>                             System.out.println("Cannot write: "+key+" RETRYING");
>                             broken=true;
>                             e.printStackTrace();
>                         }
>                     }
>                
>                     try
>                     {
>                         Column col = client1.get(keyspace, key, colPathFdl,ConsistencyLevel.QUORUM).getColumn();
>                         System.out.println(key +" column name: " + new String(col.name,
UTF8));
>                         //System.out.println("column value: " + new String(col.value,
UTF8));
>                         System.out.println(key +" column timestamp: " + new Date(col.timestamp));
>                        
>                     }
>                     catch(Exception e)
>                     {
>                         System.out.println("Cannot read: "+key);
>                         e.printStackTrace();                       
>                     }
>                
>                     try
>                     {
>                         System.out.println(key +" delete column:: "+key);
>                         client.remove(keyspace, key, colPathFdl, timestamp, ConsistencyLevel.QUORUM);
>                     }
>                     catch(Exception e)
>                     {
>                         System.out.println("Cannot delete: "+key);
>                         e.printStackTrace();                       
>                     }
>                    
>                     long stopTime = System.currentTimeMillis();
>                     long timeTaken = stopTime -startTime;
>                     System.err.println(Thread.currentThread().getName() +  " " +key+
" Last operation took "+ timeTaken+"ms" );
>                 }
>  
> 
> 
> 
> NOTICE: Cognito Limited. Benham Valence, Newbury, Berkshire, RG20 8LU. UK. Company number
02723032. This e-mail message and any attachment is confidential. It may not be disclosed
to or used by anyone other than the intended recipient. If you have received this e-mail in
error please notify the sender immediately then delete it from your system. Whilst every effort
has been made to check this mail is virus free we accept no responsibility for software viruses
and you should check for viruses before opening any attachments. Opinions, conclusions and
other information in this email and any attachments which do not relate to the official business
of the company are neither given by the company nor endorsed by it.
> 
> This email message has been scanned for viruses by Mimecast
> 


Mime
View raw message