Changeset 55243 in webkit


Ignore:
Timestamp:
Feb 25, 2010 10:16:20 AM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-02-25 Adam Barth <abarth@webkit.org>

Reviewed by David Levin.

EWS leaks memory slowly
https://bugs.webkit.org/show_bug.cgi?id=35395

The EWS bots leak memory very slowly. If you run them for about a
month, each one will take up around 1 GB of virutal memory. If you run
several of them on one machine, you'll eventually exhaust all available
memory and grind the bots to a halt.

This patch introduces a --exit-after-iteration option to the queues so
that we run them for a finite amount of time. Once they exit and
restart, they'll reclaim the leaked memory. I'm not sure how many
iterations I'll end up running them for. I'll need to sort that out
operationally, but my initial guess is around 1000.

  • Scripts/webkitpy/commands/queues.py:
  • Scripts/webkitpy/commands/queues_unittest.py:
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r55235 r55243  
     12010-02-25  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by David Levin.
     4
     5        EWS leaks memory slowly
     6        https://bugs.webkit.org/show_bug.cgi?id=35395
     7
     8        The EWS bots leak memory very slowly.  If you run them for about a
     9        month, each one will take up around 1 GB of virutal memory.  If you run
     10        several of them on one machine, you'll eventually exhaust all available
     11        memory and grind the bots to a halt.
     12
     13        This patch introduces a --exit-after-iteration option to the queues so
     14        that we run them for a finite amount of time.  Once they exit and
     15        restart, they'll reclaim the leaked memory.  I'm not sure how many
     16        iterations I'll end up running them for.  I'll need to sort that out
     17        operationally, but my initial guess is around 1000.
     18
     19        * Scripts/webkitpy/commands/queues.py:
     20        * Scripts/webkitpy/commands/queues_unittest.py:
     21
    1222010-02-25  Jarkko Sakkinen  <jarkko.sakkinen@tieto.com>
    223
  • trunk/WebKitTools/Scripts/webkitpy/commands/queues.py

    r53735 r55243  
    5858        options_list = (options or []) + [
    5959            make_option("--no-confirm", action="store_false", dest="confirm", default=True, help="Do not ask the user for confirmation before running the queue.  Dangerous!"),
     60            make_option("--exit-after-iteration", action="store", type="int", dest="iterations", default=None, help="Stop running the queue after iterating this number of times."),
    6061        ]
    6162        Command.__init__(self, "Run the %s" % self.name, options=options_list)
     63        self._iteration_count = 0
    6264
    6365    def _cc_watchers(self, bug_id):
     
    9698
    9799    def should_continue_work_queue(self):
    98         return True
     100        self._iteration_count += 1
     101        return not self.options.iterations or self._iteration_count <= self.options.iterations
    99102
    100103    def next_work_item(self):
  • trunk/WebKitTools/Scripts/webkitpy/commands/queues_unittest.py

    r53925 r55243  
    3232from webkitpy.commands.queues import *
    3333from webkitpy.commands.queuestest import QueuesTest
     34from webkitpy.mock import Mock
    3435from webkitpy.mock_bugzillatool import MockBugzillaTool
    3536from webkitpy.outputcapture import OutputCapture
     
    6566        self._assert_run_webkit_patch([1])
    6667        self._assert_run_webkit_patch(["one", 2])
     68
     69    def test_iteration_count(self):
     70        queue = TestQueue()
     71        queue.options = Mock()
     72        queue.options.iterations = 3
     73        self.assertTrue(queue.should_continue_work_queue())
     74        self.assertTrue(queue.should_continue_work_queue())
     75        self.assertTrue(queue.should_continue_work_queue())
     76        self.assertFalse(queue.should_continue_work_queue())
     77
     78    def test_no_iteration_count(self):
     79        queue = TestQueue()
     80        queue.options = Mock()
     81        self.assertTrue(queue.should_continue_work_queue())
     82        self.assertTrue(queue.should_continue_work_queue())
     83        self.assertTrue(queue.should_continue_work_queue())
     84        self.assertTrue(queue.should_continue_work_queue())
    6785
    6886
Note: See TracChangeset for help on using the changeset viewer.