From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.github.com (out-21.smtp.github.com [192.30.252.204]) by mail.toke.dk (Postfix) with ESMTPS id 313298B4BBD for ; Wed, 8 Sep 2021 18:18:12 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (1024-bit key) header.d=github.com header.i=@github.com header.b=EruP4yNM Received: from github-lowworker-cd7bc13.ac4-iad.github.net (github-lowworker-cd7bc13.ac4-iad.github.net [10.52.25.102]) by smtp.github.com (Postfix) with ESMTP id 7EFEF520B5D for ; Wed, 8 Sep 2021 09:18:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1631117891; bh=P882SRjSvOn05Hq3aGgi4OZh1/jjvm4Gj8bAn/pkLZo=; h=Date:From:Reply-To:To:Cc:Subject:List-ID:List-Archive:List-Post: List-Unsubscribe:From; b=EruP4yNMg5zvAl8djl980dMIyFPe+768LtBVqvo0g5XQZRu+kdlHvikl+Hsxg6nPg w2576F2V1r2OTimuze+YdxwhhGMtVM6ApRLIPaKYYNkpyyYCzSA5+mKUCWYQIta0mN bcFg7Rm9FwpymjEwgw0CHnT3dZj6OwJE/axVB9lU= Date: Wed, 08 Sep 2021 09:18:11 -0700 From: Shashank D To: tohojo/flent Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="--==_mimepart_6138e24371956_280cc7881848ba"; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: list X-GitHub-Sender: shashank68 X-GitHub-Recipient: flent-users X-GitHub-Reason: subscribed X-Auto-Response-Suppress: All X-GitHub-Recipient-Address: flent-users@flent.org Message-ID-Hash: 4ST3HVNIVETKSC6EHNFNWLXVA7LE3AHA X-Message-ID-Hash: 4ST3HVNIVETKSC6EHNFNWLXVA7LE3AHA X-MailFrom: noreply@github.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Subscribed X-Mailman-Version: 3.3.4 Reply-To: tohojo/flent Subject: [Flent-users] [tohojo/flent] ss_iterate.sh unnecessarily runs for a long time (#236) List-Id: Flent discussion list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: ----==_mimepart_6138e24371956_280cc7881848ba Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit I tried running a `tcp_nup` test in flent with `length` set to 200 seconds & `step-size` set to 0.05 seconds. But the test took more than 10 minutes to complete. On checking the log, I found out that the `ss_iterate.sh` was running even after other runners had finished execution. https://github.com/tohojo/flent/blob/9378031415f9d87b2ef500d082f4720abcec52da/flent/scripts/ss_iterate.sh#L43-L45 My guess is that execution time of ss command was about 0.1 ish second on average (could see from the output timestamps). So each iteration took about 0.15 seconds to execute and hence total execution of the 4200 iterations took about 10 mins. I resolved this issue by checking current time against endtime. ```bash command_string=$(cat < (I am using flent with network namespaces in Ubuntu 20.04 machine. I am unsure if this works with other environments) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/tohojo/flent/issues/236 ----==_mimepart_6138e24371956_280cc7881848ba Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

I tried running a tcp_nup test in flent with length set to 200 seconds & step-size set to 0.05 seconds. But the test took more than 10 minutes to complete. On checking the log, I found out that the ss_iterate.sh was running even after other runners had finished execution.

https://github.com/tohojo/flent/blob/9378031415f9d87b2ef500d082f4720abcec52da/flent/scripts/ss_iterate.sh#L43-L45

My guess is that execution time of ss command was about 0.1 ish second on average (could see from the output timestamps). So each iteration took about 0.15 seconds to execute and hence total execution of the 4200 iterations took about 10 mins.

I resolved this issue by checking current time against endtime.

command_string=$(cat <<EOF
duration="$(echo "$count*$interval" | bc) sec";
endtime=\$(date -d "\$duration" +%s%N);
while (( \$(date +%s%N) <= \$endtime )); do
    ss -t -i -p -n state connected "dst $target $filter"

Infact the issue exists with tc_iterate.sh as well. But the execution time only exceeded by about 20 seconds.

Now this might be a bad idea in general since the use of bc and the additional date commands may add some overhead (although I didn't see any notable difference b/w timestamps).

Does this fix seem like a good PR (to tc_iterate.sh and ss_iterate.sh)? (The endtime calculation can be done from python code and passed to this script instead of passing count (test_length / interval))

(I am using flent with network namespaces in Ubuntu 20.04 machine. I am unsure if this works with other environments)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

----==_mimepart_6138e24371956_280cc7881848ba--