hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "subramanian raghunathan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-4215) RS requestsPerSecond counter seems to be off
Date Thu, 18 Aug 2011 10:38:27 GMT

    [ https://issues.apache.org/jira/browse/HBASE-4215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086939#comment-13086939

subramanian raghunathan commented on HBASE-4215:

As part of the defect fix HBASE-3807

we proposed and modified the request attribute to
requestPersecond both in RegionServer{RegionServerMetrics} and Master{HServerLoad}

RegionServerMetrics calcualtes from MetricsRate

Following is the code doing the calcualtion:
    long now = System.currentTimeMillis();
    long diff = (now-ts)/1000;
    if (diff == 0) diff = 1; // sigh this is crap.
    this.prevRate = (float)value / diff;
    {color:red}this.prevRate = (float)value / diff;{color}
prevRate is finally displayed as "requestPersecond" as per the change in HBASE-3807

But in master the same is calculated from  HServerLoad

new HServerLoad(requestCount.get(),
      (int)(memory.getUsed() / 1024 / 1024),
      (int) (memory.getMax() / 1024 / 1024), regionLoads)

Request counter is present in HregionServer 
  // Request counter.
  // Do we need this?  Can't we just sum region counters?  St.Ack 20110412
  private AtomicInteger requestCount = new AtomicInteger();
Obtained form the request counter which is incremented in all the API's of HRegionServer 

{color:red}This is not calculated per second its representing the total request per second.{color}

but still in the master page we claim {color:green}"Load is requests per second and count
of regions loaded."{color}
This promted me in changing the convention from request to resquestPerSecond

{color:green}Ideally The fix should be calculating the requestpersecond at region server and

initializing the HServerLoad with that value and the same to be displayed in the master.{color}

Region Servers
 Address Start Code Load 
linux-kxjl:60030 1313659887824linux-kxjl,60020,1313659887824 requestsPerSecond=0, numberOfOnlineRegions=2,
usedHeapMB=26, maxHeapMB=995 
Total:  servers: 1   requests=0, regions=2 

Load is requests per second and count of regions loaded

Also its better to change the agregation details also into the new convention 
{color:red} requests=0, regions=2{color}
{color:green} requestsPerSecond=0, numberOfOnlineRegions=2{color}    

If this looks fine i can provide a patch for the same.

> RS requestsPerSecond counter seems to be off
> --------------------------------------------
>                 Key: HBASE-4215
>                 URL: https://issues.apache.org/jira/browse/HBASE-4215
>             Project: HBase
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.92.0
>            Reporter: Todd Lipcon
>            Assignee: ramkrishna.s.vasudevan
>            Priority: Critical
>             Fix For: 0.92.0
> In testing trunk, I had YCSB reporting some 40,000 requests/second, but the summary info
on the master webpage was consistently indicating somewhere around 3x that. I'm guessing that
we may have a bug where we forgot to divide by time.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message