Created
October 19, 2013 14:07
-
-
Save pomarec/7056349 to your computer and use it in GitHub Desktop.
RessourceWatcher test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[circus] | |
endpoint = tcp://127.0.0.1:5555 | |
pubsub_endpoint = tcp://127.0.0.1:5556 | |
stats_endpoint = tcp://127.0.0.1:5557 | |
debug = False | |
[watcher:memeater] | |
cmd = python memeater.py | |
numprocesses = 1 | |
[plugin:reswatcher] | |
use = circus.plugins.resource_watcher.ResourceWatcher | |
watcher = memeater | |
max_mem = 0.1 | |
check_delay = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time, sys, os, random | |
data = [] | |
while True: | |
data.append("a" * 1000 * 1000 * random.randint(2, 8)) | |
print "My data size is ", int(os.popen('ps -p %d -o %s | tail -1' % (os.getpid(), 'rss')).read()) | |
time.sleep(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
2013-10-19 16:08:45 [21329] [INFO] Registering signals...
INFO:circus:Registering signals...
2013-10-19 16:08:45 [21329] [INFO] Starting master on pid 21329
INFO:circus:Starting master on pid 21329
2013-10-19 16:08:45 [21329] [INFO] plugin:reswatcher started
INFO:circus:plugin:reswatcher started
2013-10-19 16:08:45 [21329] [INFO] circusd-stats started
INFO:circus:circusd-stats started
2013-10-19 16:08:45 [21329] [INFO] memeater started
INFO:circus:memeater started
2013-10-19 16:08:45 [21329] [INFO] Arbiter now waiting for commands
INFO:circus:Arbiter now waiting for commands
My data size is 11740
2013-10-19 16:08:45 [21331] [INFO] Starting the stats streamer
INFO:circus:Starting the stats streamer
My data size is 18584
My data size is 24444
My data size is 31280
My data size is 33236
My data size is 39096
My data size is 43004
My data size is 48864
My data size is 52772
My data size is 56680
My data size is 58636
My data size is 63520
My data size is 68404
My data size is 75240
My data size is 82076
My data size is 85008
My data size is 91844
My data size is 94776
My data size is 96732