[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #28877 [Core Tor/Tor]: Paginate large controller commands like 'GETINFO desc/all-recent'
#28877: Paginate large controller commands like 'GETINFO desc/all-recent'
--------------------------+--------------------------
Reporter: wagon | Owner: (none)
Type: defect | Status: assigned
Priority: Medium | Milestone:
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
--------------------------+--------------------------
Comment (by atagar):
> Hello, atagar. Thank you for the explanation, now it is more clear for
me.
Thanks wagon! These are interesting stats.
> Could you explain why it is a problem?
Do you have a SSD? When I run on my newish laptop I get similar results...
{{{
atagar@morrigan:~$ time tor-prompt --run 'GETINFO ns/all' 1>/dev/null
real 0m0.236s
user 0m0.108s
sys 0m0.045s
}}}
... but when I run on my admittedly ancient PC it's not so rosy...
{{{
atagar@odin:~$ time tor-prompt --run 'GETINFO ns/all' 1>/dev/null
real 0m1.466s
user 0m0.240s
sys 0m0.116s
}}}
I suspect this might be a matter of disk iops. Again, this command is
reading fourteen megabytes of data from disk then dumping it on the
socket. Stem (and by extension Nyx) get ran in low resource environments
(arduino and such) where such commands can easily block the control
connection for tens of seconds to minutes.
You're absolutely right that in your case (and most people's) these are
fine, but these commands are no-gos if distributing an application more
broadly.
> People always say that shell is too slow and inconvenient, while python
is really fast and convenient. However...
These are interesting numbers. I should profile our controller code with
this input to figure out where the time's being spent (I made several
optimizations for the Stem 1.7 release, but there's probably more room for
improvement).
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28877#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs