Re: Tor BSD underperformance (was [Tor-BSD] Recognizing Randomness Exhaustion)

2015-01-03 Thread Greg Troxel
teor teor2...@gmail.com writes:

 Tor 0.2.6.2-alpha (just in the process of being released) has some
 changes to queuing behaviour using the KIST algorithm.

 The KIST algorithm keeps the queues inside tor, and makes
 prioritisation decisions from there, rather than writing as much as
 possible to the OS TCP queues. I'm not sure how functional it is on
 *BSDs, but Nick Mathewson should be able to comment on that. (I've
 cc'd tor-dev and Nick.)

From skimming the KIST paper (I will read in detail when I find time),
it seems they are claiming increase in throughput of around 10%, with
the main benefit being lower latency.  So while that sounds great, it
doesn't seem like lack of KIST is the reason for the apparent 3x
slowdown observed in OpenBSD.

Does anyone have experience to report on any platform other than Linux
or OSX?

[demime 1.01d removed an attachment of type application/pgp-signature]



Re: [Tor-BSD] Recognizing Randomness Exhaustion

2015-01-01 Thread Greg Troxel
Libertas liber...@mykolab.com writes:

 Some of the people at tor-...@lists.nycbug.org and I are trying to
 figure out why Tor relays under-perform when running on OpenBSD. Many
 such relays aren't even close to being network-bound,
 file-descriptor-bound, memory-bound, or CPU-bound, but relay at least
 33-50% less traffic than would be expected of a Linux machine in the
 same situation.

I'm more familiar with NetBSD, but hopefully my comments are helpful.

 For those not familiar, a Tor relay will eventually have an open TCP
 connection for each of the other 6,000 active relays, and (if it allows
 exit traffic) must make outside TCP connections for the user's requests,
 so it's pretty file-hungry and crypto-intensive.

It may also have something to do with TCP.  A few thoughts:

* run netstat -f inet and look and the send queues.  That's not really
  cleanly diagnostic, but if they are all huge, it's a clue

* run netstat -m and vmstat -m (not sure those map from NetBSD).  Look
  for runnig out of mbufs and mbuf clusters.   Perhaps bump up
  NMBCLUSTERS in the kernel if it's not dynamic.

* Take a critical look at your TCP performance.  This is not that easy,
  but it's very informatve.   Get and install xplot:
http://www.xplot.org/
  Take traces of v4 tcp trafffic with
tcpdump -wTCP -i wm0 ip and tcp
  and then
tcpdump -r TCP -tt -n -S | tcpdump2xplot
  Then you'll need to read all the xplot READMEs (see the source).  This
  will show you tcp transmitted segments, sack blocks, the ack line, dup
  acks, and other TCP behavior.  It's not that easy to follow, but if
  you understand TCP you'll be able to spot odd behavior far faster than
  reading text traces.   It's possible that tcpdump2xplot may mishandle
  OpenBSD's tcpdump output - it's perl to turn text back into bits, and
  it's broken over the years with tcpdump upgrades.

  You may well not want to send me a trace, but if you send me the
  binary pcap, the text version above, or the tcpdump2xplot files, I can
  take a look.

 One possible explanation is that its randomness store gets exhausted. I
 once saw errors like this in my Tor logs, but I don't know how to test
 if it's a chronic problem. I also couldn't find anything online. Is
 there any easy way to test if this is the bottleneck?

On NetBSD, there is rndctl -s.  I would expect the same or similar in
OpenBSD, and you can look every second to see if there are bits still in
the pool.  I don't think this will turn out to be the issue, though, if
you're seeing 30% of what you think you should - I would expect the
performance hit due to running out of bits to be much bigger.

Greg

[demime 1.01d removed an attachment of type application/pgp-signature]



Re: BSD laptop

2006-11-23 Thread Greg Troxel
  I tried installing NetBSD 3.0 as well, but it couldn't find any disks
  to install to.

In my T60, I set disk controller to legacy, which makes it look like
PIIX rather than AHCI.

  Doesn't work at all or barely: suspend/resume, WLAN, SD reader,
  fingerprint reader.

wlan is intel?  I have ath(4) in mine (ordered on purpose that way)
and it works fine.

Newer current (last month or so?) is better on the wm(4) but the PHY
programming is still off.  Perhaps that's your latency issue.

My experience on T60 is otherwise similar.
-- 
Greg Troxel [EMAIL PROTECTED]