Skip to content

if we had a server with big diskspace, function build_vol_hash_table cost to much to build the vol_hash_table for CacheVol #1603

@bluestn

Description

@bluestn

if the Volume space is 50TB, the rtable_size will be 50 1000 * 1000 / 8=6250000,it cost too much memory and cpu usage( see the code in build_vol_hash_table listed below), maybe we need to optimize this build_vol_hash_table function.*

rtable_pair *rtable = (rtable_pair *)ats_malloc(sizeof(rtable_pair) * rtable_size);
 int rindex = 0;
 for (int i = 0; i < num_vols; i++)
   for (int j = 0; j < (int)rtable_entries[i]; j++) {
     rtable[rindex].rval = next_rand(&rnd[i]);
     rtable[rindex].idx = i;
     rindex++;
   }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions