intel-cloud / cosbench

a benchmark tool for cloud object storage service
Other
573 stars 242 forks source link

Some confusion about ”runtime” #400

Closed xieyuyang closed 3 years ago

xieyuyang commented 4 years ago

version:v0.4.2.c4

`

  <work name="main" workers="60" runtime="30">

    <operation type="read" ratio="100" config="cprefix=bucketname;containers=u(1,1);objects=u(1,1)" />

  </work>

</workstage>

` in our test case, we set runtime to 30, object size is 4G, so cosbench will always time out.

but sometimes cosbench always processing, never stoped: Active Workloads: w21 Tue Jul 21 09:55:24 CST 2020 PROCESSING s1-read-object Total: 1 active workloads

check the soucecode, find change:

` \dev\cosbench-driver\src\com\intel\cosbench\driver\service\MissionHandler.java

public void stress() {

    /* for strong consistency: a lock should be employed here */

    if (!missionContext.getState().equals(AUTHED))

        throw new IllegalStateException(

                "mission should be in the state of authed");

    String id = missionContext.getId();

    LOGGER.debug("begin to execute mission {}", id);

    try {

        stressTarget();

    } catch (TimeoutException te) {

        /* no need to shutdown agents again */

        boolean shutdownNow = false;

        abortAgents(shutdownNow);

      //missionContext.setState(ABORTED);        <====== this line is commented

        return;

    } catch (AbortedException ae) {

   ........

}`

when the job cannot finish in runtime+60 seconds, TimeoutException will be throw(tcp sockets to server closed at the same time), but job status never changed, always processing.

if i add "missionContext.setState(ABORTED);" to function stress, job status will be correct.

anyone knows why this line is commented? thks!

kisscelia commented 3 years ago

Hi, may i ask you a question? Now, do you add this line(missionContext.setState(ABORTED);) to the code when run your test? Emm... may i add you on wechat or QQ? :)