- Oct 30, 2017
-
-
Damian Johnson authored
These are to sidestep issues on some platforms. Generally certainly fine if they don't take effect. Caught thanks to tor-relays@ beta tester on FreeBSD... nyx: environment corrupt; missing value for Traceback (most recent call last): File "./run_nyx", line 14, in <module> nyx.main() File "/usr/home/ryan/nyx/nyx/__init__.py", line 147, in main nyx.starter.main() File "/usr/home/ryan/nyx/stem/util/conf.py", line 289, in wrapped return func(*args, config = config, **kwargs) File "/usr/home/ryan/nyx/nyx/starter.py", line 90, in main os.putenv('LANG', 'C') # make subcommands (ps, netstat, etc) provide english results OSError: [Errno 14] Bad address
-
Damian Johnson authored
-
Damian Johnson authored
Hey, it's only a couple orders of magnitude. ... *sigh*.
-
Damian Johnson authored
Why did we divide by that? Weird. Because of it we always showed tor's cpu usage as 0%.
-
Damian Johnson authored
We shouldn't silently swallow errors. Opting for notice runlevel so they're visible to users by default so they can be reported.
-
Damian Johnson authored
The 'width' attribute already takes into account the initial 'x' offset, but in the conditional we didn't account for that causing connection details to just about never be shown.
-
Damian Johnson authored
Fixing a couple easy to make gotchas in our --log argument. It's especially confusing becuase nyx expected 'NYX_WARNING' whereas it displayed 'NYX_WARN'.
-
- Oct 29, 2017
-
-
Damian Johnson authored
Typo Roger spotted in the comments.
-
Damian Johnson authored
Lighten the work needed by the ConsensusTracker by having it process unparsed consensus content. We already do this when starting up, so this actually simplifies our code quite a bit.
-
Damian Johnson authored
If the dialog's title is shorter than the content (which happens when we lack descriptors) the dialog crops the title.
-
Damian Johnson authored
It's rare, but once I spotted a "[0 duplicates hidden]" in my logs. Reason is that the message deduplicated, but then the log got long enough that the duplicate was dropped.
-
- Oct 26, 2017
-
-
Damian Johnson authored
Now that stem can cache our address we can drop our our_address() helper.
-
- Oct 25, 2017
-
-
Damian Johnson authored
Calling the endpoint of our own circuits 'exit' worries folks on occasion, concerned that they might accidently be running an exit relay. Renaming the termination point to 'end' to hopefully avoid those concerns... https://trac.torproject.org/projects/tor/ticket/12956
-
Damian Johnson authored
Replacing the textual listing with images to give the page a friendlier, more approachable feel.
-
Damian Johnson authored
Rather than directing users toward the nyxrc.sample file providing them with a webpage describing the options. Also making it more discoverable by putting it in the 'more' menu.
-
- Oct 24, 2017
-
-
Damian Johnson authored
Lots of breakages have slipped in while attempting to improve our performance. Most were timing related due to our switch to static sleeps.
-
- Oct 23, 2017
-
-
Damian Johnson authored
Oops! Forgot to add a couple small image resources.
-
Damian Johnson authored
Simple page listing our relay support channels (email list, irc, trac, and me).
-
Damian Johnson authored
When looking at our site I just realized it's hard to figure out how to report bugs. It's in the FAQ, but who's gonna read that? Adding a 'more' dropdown menu with useful, but less common sections folks will want (changelog, bug tracker, and contact info for now). The contact page doesn't exist yet - that's next. God the styling on this was a pita. I'm really not sure why this negative margin is necessary but without it the rest of the nav menu gets pushed down. Stared for hours at this hoping to get something simpler but time to raise the flag and commit what works. I really hate the lack of a shared header, but can't say that alone is worth something like Hyde. :/
-
- Oct 22, 2017
-
-
Damian Johnson authored
Connections shouldn't use a lru_cache. If the cache size is less than the number of connections we have at any point then we consume extra cpu, but if it's too high we consume more and more memory unnecessarily until it's filled. Instead evicting from the cache when a connection hasn't been referenced in a while.
-
- Oct 21, 2017
-
-
Damian Johnson authored
Interesting graph panel timing bug when draw's concurrently invoked before we've set stats_paused. Only seen it once, but simple to fix. File "/home/atagar/Desktop/nyx/nyx/curses.py", line 737, in draw func(_Subwindow(subwindow_width, subwindow_height, curses_subwindow)) File "/home/atagar/Desktop/nyx/nyx/panel/graph.py", line 569, in _draw stat = self._stats_paused[self._displayed_stat] TypeError: 'NoneType' object has no attribute '__getitem__'
-
Damian Johnson authored
Interesting. The lru_cache for from_connection works, but the ones for the methods don't. This causes truly horrid performance when you have a ton of connections since it's recalculating the type and lines with every redraw.
-
- Oct 15, 2017
-
-
Damian Johnson authored
When paused daemon updates turned into a busy loop, pegging the cpu. Actually, I'm unsure why we're checking the paused status at all since daemons still run in the background.
-
Damian Johnson authored
Replacing stat cloning with a simple lock bought us some performance improvement but it also introduced a deadlocking issue. If redraw is called while we're updating a stat the interface freezes. This can be easily sidestepped by only locking for the stat update and not including the redraw call.
-
- Oct 11, 2017
-
-
Damian Johnson authored
Tor's DisableDebuggerAttachment feature breaks all methods we attempt to get tor's cwd (/proc, pwdx, and lsof). However, this is fine since we only need the cwd to expand relative paths which doesn't come up much (iirc tor makes more effort nowadays to give only absolute paths). Skipping cwd resolution if a path's relative so we avoid the doomed system calls.
-
Damian Johnson authored
Stem transparently caches immutable information but our address is a rather strange critter. It can change but hardly ever does, and is used quite a bit. Nyx forced Stem to treat this as being cachable but when our address is unavailable this still accounted for numerous requests. Instead fetching the our address at a fixed rate of once a minute. This provides two benefits... * Avoid pointless requests while there's no network available. * This way we'll evenually update our address if it changes while running.
-
Damian Johnson authored
When the interpreter panel has content the scollbar doesn't report itself as being at the bottom.
-
- Sep 30, 2017
-
-
Damian Johnson authored
Threading conditionals are the proper method of doing an interruptable sleep, so nyx can shut down right away when quit. However, each of these conditionals impose a surprisingly high tax in terms of baseline cpu usage. Fully half the cpu when idle is just spent on checking conditionals. Guess they're implemented with some sort of busy puller... We don't need interruptability. It's nice, but having our interface take a fraction of a second is well worth halving our cpu usage. When idle this change drops cpu usage from 2.1% to 1.1% for me. Pause Cpu 0.1s 1.4% 0.2s 1.3% 0.3s 1.2% 0.4s 1.1% 0.5s 1.1% 0.6s 1.1%
-
Damian Johnson authored
No detectable difference when I lack any connections, but constructing this lists with every connection entry is silly (even if it is cached). Constructing a set once instead for constant time lookups.
-
- Sep 29, 2017
-
-
Damian Johnson authored
Turns out having a daemon panel reacquire a lock every 0.2 seconds is fairly taxing, even if the panel isn't doing anything. That, and having the log panel every 0.3 seconds is kinda silly. This drops the log panel usage when idle by 80% (0.5% to 0.1% on my system).
-
Damian Johnson authored
There's no point in fetching graph title stats every second. These change on an hourly basis. Caching this and skipping vline when there's nothing to display drops our cpu usage when idle by 70% (from 1% to 0.3% on my system).
-
- Sep 27, 2017
-
-
Damian Johnson authored
Unnecessarily providing the 'forced' flag when redrawing can cause screen flickering, but omitting it causes actions to not be visible. For instance, when the relay is inactive changing pages takes seconds to appear.
-
- Sep 24, 2017
-
-
Damian Johnson authored
My relay complains with... 19:13:35 [NYX_INFO] Failed three attempts to determine the process using active ports (unrecognized output from lsof (lines are expected to have ten fields: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME): COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME) This is because there's a single space after 'COMMAND' rather than two, causing us not to omit the title line from parsing. Making this less strict.
-
Damian Johnson authored
Finally got it! The connection panel's performance relies on heavily reusing cached resources. However, on my moderately busy relay I have 2000 connections whereas lur_cache's default size is only 250. This caused us to constantly evict and recreate resources every five seconds. This change drops the nyx cpu usage for me from 28% to 16%.
-
Damian Johnson authored
-
- Sep 22, 2017
-
-
Damian Johnson authored
At only INFO runlevel cpu usage on my relay jumps from 13% to 20%. This is entirely coming from deduplication. We made this far more efficient (linear from n^2) but it's pretty easy to finish dropping this down to a constant time operation.
-
- Sep 16, 2017
-
-
Damian Johnson authored
Our graph panel updates and redraws itself every second, making it a non-trivial load on cpu. Two actions in particular account for most of it... * Cloning stats on every redraw. This constantly consumes 0.3% cpu on my relay. Being lock-free is nice, but in this case a lock really makes sense. * Performing a flurry of addstr calls for each cell in the graph. Doing a single vline call for each column instead drops cpu by another 0.4%. On my relay this drops cpu usage of the graph panel from 1% to 0.4% (60% less)... * 0.3% cpu usage when only the header panel is rendered * 1.3% cpu usage when the graph panel was rendered too * 0.7% cpu usage when the graph panel was rendered with these changes
-
Damian Johnson authored
If the nyxrc disables all our panels except the header then we crash with... Traceback (most recent call last): File "/home/ubuntu/nyx/run_nyx", line 14, in <module> nyx.main() File "/home/ubuntu/nyx/nyx/__init__.py", line 137, in main nyx.starter.main() File "/home/ubuntu/nyx/stem/util/conf.py", line 289, in wrapped return func(*args, config = config, **kwargs) File "/home/ubuntu/nyx/nyx/starter.py", line 94, in main nyx.curses.start(nyx.draw_loop, acs_support = config.get('acs_support', True), transparent_background = True, cursor = False) File "/home/ubuntu/nyx/nyx/curses.py", line 216, in start curses.wrapper(_wrapper) File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper return func(stdscr, *args, **kwds) File "/home/ubuntu/nyx/nyx/curses.py", line 214, in _wrapper function() File "/home/ubuntu/nyx/nyx/__init__.py", line 155, in draw_loop interface = nyx_interface() File "/home/ubuntu/nyx/nyx/__init__.py", line 217, in nyx_interface Interface() # constructor sets NYX_INTERFACE File "/home/ubuntu/nyx/nyx/__init__.py", line 574, in __init__ visible_panels = self.page_panels() File "/home/ubuntu/nyx/nyx/__init__.py", line 638, in page_panels return [self._header_panel] + self._page_panels[page_number] IndexError: list index out of range
-
- Sep 14, 2017
-
-
Damian Johnson authored
Truncation of '.0' from values had a bug where it made units disappear... Bandwidth (limit: 5/s, burst: 1/s, measured: 10.3 KB/s):
-
Damian Johnson authored
-