Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2178)

Issue 8342040: Gather history of capture and encode time determine next recoring delay (Closed)

Created:
9 years, 2 months ago by Alpha Left Google
Modified:
9 years, 1 month ago
Reviewers:
Sergey Ulanov, Wez
CC:
chromium-reviews, jamiewalch+watch_chromium.org, hclam+watch_chromium.org, simonmorris+watch_chromium.org, wez+watch_chromium.org, Paweł Hajdan Jr., dmaclach+watch_chromium.org, garykac+watch_chromium.org, lambroslambrou+watch_chromium.org, ajwong+watch_chromium.org, sergeyu+watch_chromium.org
Visibility:
Public.

Description

Gather history of capture and encode time determine next recoring delay The current logic of chromoting is to capture as fast as possible with 20fps as a hard limit. This creates a heavy load on the slower systems with only one processor. I measured 100% CPU load running on these systems, resulting in very jerky performance. In addition to speed up capture and encode we should use system load and configurations as an information to determine recording frequency. In this patch I used the number of processors and history of capture and encode time to determine the next recording delay. This essentially lower recoding frequency when system is under load or is incapable to catch up with the current 20fps frequency. I have tested this patch on a Linux system limited to single core and intentionally added extra 70ms of while(1) loop in capture and encode to simulate slow processing. The results are as follows: CPU load Latency Before 100% 440ms After ~50% 360ms So as a result both CPU load and latency improved. BUG=100314 TEST=remoting_unittests and manually test with with heavily loaded system Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=108871

Patch Set 1 #

Patch Set 2 : tested and removed testing code #

Total comments: 50

Patch Set 3 : done #

Total comments: 32

Patch Set 4 : done #

Patch Set 5 : done #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+136 lines, -100 lines) Patch
A remoting/host/capture_scheduler.h View 1 2 3 1 chunk +39 lines, -0 lines 0 comments Download
A remoting/host/capture_scheduler.cc View 1 2 3 1 chunk +61 lines, -0 lines 4 comments Download
M remoting/host/screen_recorder.h View 1 2 3 5 chunks +8 lines, -11 lines 0 comments Download
M remoting/host/screen_recorder.cc View 1 2 3 8 chunks +26 lines, -43 lines 0 comments Download
M remoting/host/screen_recorder_unittest.cc View 1 chunk +0 lines, -46 lines 1 comment Download
M remoting/remoting.gyp View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
Alpha Left Google
9 years, 2 months ago (2011-10-19 16:07:36 UTC) #1
Alpha Left Google
On 2011/10/19 16:07:36, Alpha wrote: I didn't the down side of doing, it's that framerate ...
9 years, 2 months ago (2011-10-19 22:36:56 UTC) #2
Sergey Ulanov
I like that you separated frame rate control from ScreenRecorder! I have some comments and ...
9 years, 2 months ago (2011-10-20 00:17:00 UTC) #3
Wez
http://codereview.chromium.org/8342040/diff/2001/remoting/host/recording_rate_regulator.cc File remoting/host/recording_rate_regulator.cc (right): http://codereview.chromium.org/8342040/diff/2001/remoting/host/recording_rate_regulator.cc#newcode15 remoting/host/recording_rate_regulator.cc:15: const int kStatisticsWindow = 3; What units is this ...
9 years, 2 months ago (2011-10-20 00:52:15 UTC) #4
Alpha Left Google
http://codereview.chromium.org/8342040/diff/2001/remoting/host/recording_rate_regulator.cc File remoting/host/recording_rate_regulator.cc (right): http://codereview.chromium.org/8342040/diff/2001/remoting/host/recording_rate_regulator.cc#newcode15 remoting/host/recording_rate_regulator.cc:15: const int kStatisticsWindow = 3; On 2011/10/20 00:52:15, Wez ...
9 years, 2 months ago (2011-10-20 14:18:19 UTC) #5
Sergey Ulanov
http://codereview.chromium.org/8342040/diff/2001/remoting/host/recording_rate_regulator.cc File remoting/host/recording_rate_regulator.cc (right): http://codereview.chromium.org/8342040/diff/2001/remoting/host/recording_rate_regulator.cc#newcode20 remoting/host/recording_rate_regulator.cc:20: base::TimeDelta::FromMilliseconds(50); On 2011/10/20 14:18:20, Alpha wrote: > On 2011/10/20 ...
9 years, 2 months ago (2011-10-20 17:19:10 UTC) #6
Alpha Left Google
I think it's better to take smaller steps, i.e. find a way to make flow ...
9 years, 2 months ago (2011-10-21 16:32:59 UTC) #7
Wez
On 2011/10/21 16:32:59, Alpha wrote: > I think it's better to take smaller steps, i.e. ...
9 years, 2 months ago (2011-10-21 17:18:14 UTC) #8
Alpha Left Google
ping!
9 years, 2 months ago (2011-10-24 10:32:28 UTC) #9
Sergey Ulanov
On 2011/10/24 10:32:28, Alpha wrote: > ping! Can you please address my and Wez's comments ...
9 years, 2 months ago (2011-10-24 23:27:43 UTC) #10
Wez
http://codereview.chromium.org/8342040/diff/2001/remoting/host/recording_rate_regulator.cc File remoting/host/recording_rate_regulator.cc (right): http://codereview.chromium.org/8342040/diff/2001/remoting/host/recording_rate_regulator.cc#newcode15 remoting/host/recording_rate_regulator.cc:15: const int kStatisticsWindow = 3; On 2011/10/20 14:18:20, Alpha ...
9 years, 2 months ago (2011-10-25 00:05:37 UTC) #11
Alpha Left Google
http://codereview.chromium.org/8342040/diff/2001/remoting/host/recording_rate_regulator.cc File remoting/host/recording_rate_regulator.cc (right): http://codereview.chromium.org/8342040/diff/2001/remoting/host/recording_rate_regulator.cc#newcode15 remoting/host/recording_rate_regulator.cc:15: const int kStatisticsWindow = 3; On 2011/10/25 00:05:37, Wez ...
9 years, 1 month ago (2011-10-31 18:47:24 UTC) #12
Sergey Ulanov
lgtm http://codereview.chromium.org/8342040/diff/2001/remoting/host/screen_recorder.cc File remoting/host/screen_recorder.cc (right): http://codereview.chromium.org/8342040/diff/2001/remoting/host/screen_recorder.cc#newcode30 remoting/host/screen_recorder.cc:30: static const int kMaxRecordings = 2; On 2011/10/31 ...
9 years, 1 month ago (2011-10-31 20:17:17 UTC) #13
Wez
LGTM, but please see my comments re comments, below! http://codereview.chromium.org/8342040/diff/5002/remoting/host/capture_scheduler.cc File remoting/host/capture_scheduler.cc (right): http://codereview.chromium.org/8342040/diff/5002/remoting/host/capture_scheduler.cc#newcode20 remoting/host/capture_scheduler.cc:20: ...
9 years, 1 month ago (2011-10-31 22:05:52 UTC) #14
Sergey Ulanov
9 years, 1 month ago (2011-11-10 00:39:12 UTC) #15
http://codereview.chromium.org/8342040/diff/17001/remoting/host/screen_record...
File remoting/host/screen_recorder_unittest.cc (left):

http://codereview.chromium.org/8342040/diff/17001/remoting/host/screen_record...
remoting/host/screen_recorder_unittest.cc:107: TEST_F(ScreenRecorderTest,
OneRecordCycle) {
What's the reason to remove this test?

Powered by Google App Engine
This is Rietveld 408576698