locked
Caching big data - bug RRS feed

  • Question

  • Hello,

    I've created an environment which contains a cluster of 2 cache host services.
    I've set one of the cache service's size to 10 MB and the other to 100 MB.
    I'm trying to do a simple put(i.e. without a lock handle or a versioning) of a very big data (aprox. 50 MB of binary data)
    Sadly enough, I don't get any indication if the action succeded or not. when I try to get the value the result is null.
    Is it realted to the cahce type configuration ? i.e. should I set my cache to work in partitions ? and if so, how  ? 

    Thanks,
    Ron
    • Edited by ronchuk Monday, September 21, 2009 1:56 PM
    Thursday, September 17, 2009 4:31 PM

Answers

  • Hi

    If you want to store 50 MB of data, you should not set the cache size as 10 MB on either of the server. In fact, you should let the Velocity service have the default configured value (50% of RAM).

    Please make the change and observe if the problem goes away.

    I am not sure what you mean by "I don't get any indication if the action succeded or not". The Put API returns without failure means that put has succeeded. However, since your object may have landed on the server with 10 MB as max limit, you may see that object getting evicted as soon as stored (to keep the memory under control).

    In general, all the CacheHosts should be homogeneous as far as configuration and hardware is concerned.

    thanks!

    Ankur
    Monday, September 21, 2009 3:50 PM
    Moderator
  • Hi

    Couple of points here.

    1. Cache is partitioned, yes and it puts partitions randomly on the machines. Therefore any key can get mapped to any machine.
    2. Since the machine which should get your key is having less memory allocated for Velocity, it is but natural that it evicts it.
    3. In future, we are looking at a more intelligent load balancing schemes, wherein we may look at remapping the partitions to machine allocation based on machine capacity etc. as well, but nothing is concrete as of now.
    4. The distribution does not change whether simple or routing client is used, it is simply random.

    In practice, I don't see someone put objects bigger than the allocated sizes!

    Thanks.

    Ankur
    Tuesday, September 22, 2009 7:03 PM
    Moderator

All replies

  • I know that it doesn't relate to partitions since by default it configures to work with partitions.

    How can I solved this crucial issue ?
    Monday, September 21, 2009 6:37 AM
  • I've noticed that if i set the deployment attribute of the dataCacheClient section in the client application config file as follows:

    <dataCacheClient deployment="simple">

     

    It solves the problem, hence it seems to me as a bug in the CTP 3.0 

    Please share with me your thoughts

    Monday, September 21, 2009 1:56 PM
  • Hi

    If you want to store 50 MB of data, you should not set the cache size as 10 MB on either of the server. In fact, you should let the Velocity service have the default configured value (50% of RAM).

    Please make the change and observe if the problem goes away.

    I am not sure what you mean by "I don't get any indication if the action succeded or not". The Put API returns without failure means that put has succeeded. However, since your object may have landed on the server with 10 MB as max limit, you may see that object getting evicted as soon as stored (to keep the memory under control).

    In general, all the CacheHosts should be homogeneous as far as configuration and hardware is concerned.

    thanks!

    Ankur
    Monday, September 21, 2009 3:50 PM
    Moderator
  • Hi,

    Thanks for your reply.

    Actually, I've gave an example for an extreme scenario.

    Homogeneous environment is a great solution in utopian wrold.
    Unfortunately, in a real world with scarce resources it rarly happens, thus, my environment might include servers with different size of cache.

    Even if I use a large interval between LWM and HWM I might end up with a scenario similar to the one stated in the previous post.

    I.e. two cache hosts one is practically empty and the other one is very close to its defined LWM percentage.
    Now, a new object need to be added but "might lands" in the almost full cache and not in the empty cache, thus, implying an immediate eviction while the user is not even aware for this.

    1)"might have landed" as you wrote in your post ? Im working with partitioned cache type which suppose to distribute the items across the cache hosts in a balanced way.

    2)This problem arises when my client app uses routing deploymnet (which is the recommended client type to work with) and eliminates when using the simple client type.

    3)since one of my cache is big enough two hold the large object (the two host are also lead host) I don't understand why the cluster insists to put the object in the small cache and not in the big one?

    Thanks,

    Ron
     
    Tuesday, September 22, 2009 8:51 AM
  • Hi

    Couple of points here.

    1. Cache is partitioned, yes and it puts partitions randomly on the machines. Therefore any key can get mapped to any machine.
    2. Since the machine which should get your key is having less memory allocated for Velocity, it is but natural that it evicts it.
    3. In future, we are looking at a more intelligent load balancing schemes, wherein we may look at remapping the partitions to machine allocation based on machine capacity etc. as well, but nothing is concrete as of now.
    4. The distribution does not change whether simple or routing client is used, it is simply random.

    In practice, I don't see someone put objects bigger than the allocated sizes!

    Thanks.

    Ankur
    Tuesday, September 22, 2009 7:03 PM
    Moderator