Better HN
topnewbestaskshowjobs
Log inSign up

gmazza

205 karma · joined Jun 13, 2016 (10y ago) · 48 submissions

Submissions

comment 9y ago · link · parent

https://caddyserver.com/

Caddy is written in Go, and make use of native fibers/green threads/goroutines.

comment 9y ago · link · parent

Middle ground between dropping [1] and buffering is Active Queue Management as wtallis pointed out above. State of the art AQM on Linux nowadays is CoDel [2].

Big network gear vendors that ship to ISPs have adopted early forms of AQM (both RED [3] and proprietary algorithms) quite a while ago - they had to:

(a) backbone routers have much smaller buffer-to-bandwidth ratio (compared to a PC or even home router), so endless buffering is not an option;

(b) buffer tail drops (i.e. what drop keyword does when added to tc filters/disciplines) interact really poorly with TCP bandwidth control algorithms, and rather badly with RTP streams, too (so drop is not an option either - it ruins user's connections; and

(c) ISPs and carriers would typically run links (on average) much closer to saturation than your typical home router, so situation where router has to make buffer/drop decision is much, much more frequent.

[1] My point above was that you don't really want to drop packets on the receiver side, after that packet already traversed expensive part of the network.

[2] https://en.wikipedia.org/wiki/CoDel

[3] https://en.wikipedia.org/wiki/Random_early_detection

comment 9y ago · link · parent

> Wrong: you see 10KB/s download speed because you are not throttling the incoming packets but the outgoing packets!

Yep. TC's default is to policy outgoing traffic, which in OP's example is a bunch of TCP ACKs essentially. Instead, they should be using ingress keyword, something like described here:

http://blog.stevedoria.net/20050906/ingress-policing-with-li...

Caveat emptor: ingress rate-limiting is hard. Long story short, it all boils down to what you do with non-confirming packets: There are two alternatives, and both are rather sub-optimal. You can either buffer/delay packets in kernel space (default, which leads to bufferbload and memory waste), or drop (which author linked above opted for, which leads to excessive retransmits and bandwidth waste).

comment 9y ago · link · parent

If you don't need hierarchical classes[1], just use tbf (token bucket filter) instead of htb (hierararchy token bucket) - it's more efficient, more compact, and gives you access to delay in the same discipline as well. Compare:

  # htb
  tc qdisc add dev eth0 handle 1: root htb default 11
  tc class add dev eth0 parent 1: classid 1:1 htb rate 1kbps
  tc class add dev eth0 parent 1:1 classid 1:11 htb rate 1kbps
vs.

  # tbf
  tc qdisc add dev eth0 root tbf rate 1kbit latency 42ms burst 2k
"man htb" and "man tbf" are quite usable too.

[1] i.e. stuff like "I would like to have tcp/80 limited to 10 mbit/s, tcp/443 limited to 15 mbit/s, while sum of above should never exceed 20mbit/s, and tcp/80 should get priority when competing for that shared 20mbit/s"

EDIT: changed to "burst 2k". Having burst lower than interface MTU will delay large packets essentially forever.

comment 9y ago · link · parent

> I wish there were an API to detect how much data still hasn't been acked.

From example code attached to the original article (Linux only):

  int outstanding;
  ioctl(fd, SIOCOUTQ, &outstanding);

comment 10y ago · link · parent

And that is exactly why open IM protocols and 3rd party clients are so important.

If both you and your correspondents do use 3rd party IM client ([1], [2], etc), then just run OTR2 or OMEMO on top of the protocol, and let google store whatever it pleases - it's not going to be much use for them.

[1] https://pidgin.im/

[2] https://conversations.im/

comment 10y ago · link · parent

If this [1] Lenovo employee's answer is a real deal, and this was in fact sanctioned by MS, I wonder if their actual goal was to prevent people from installing Windows 8/7/whatever. MS did go on record by saying they are willing to block people from installing old versions on new hardware. [2]

[1] http://imgur.com/a/niewu

[2] http://www.theverge.com/2016/1/16/10780876/microsoft-windows...

comment 10y ago · link · parent

Have a look lenovo forums [1] (also linked prominently from original article), where OP has following to say:

  I am attempting to install ubuntu 16.04 on my yoga 900.
  The bios can see the 512 gb samsung hard drive and so can Windows.

  The ubuntu installer can not see it at all. 
...and first person to reply adds:

  I have the same issue with the 900S model. 
 
  I have tried the newest kernel 4.6 but linux doesn't
  even list the pci express device in lspci.
So no, positively not the 3.2.x kernel to blame here.

[1] https://forums.lenovo.com/t5/Linux-Discussion/Yoga-900-13ISK...

comment 10y ago · link · parent

Obligatory XKCD:

https://xkcd.com/1174/

comment 10y ago · link · parent

And for an example of co-existence of competing languages, see javascript triggering flash/actionscript (e.g. for clipboard access) and vice-versa (e.g. for DOM access).

Both are somewhat dated examples, that is pre-HTML5.

comment 10y ago · link · parent

This was mostly from a personal experience of running couple of dozens Raspberry Pies. To elaborate:

- Cheap cards would start corrupting right in the middle of first "apt-get update && apt-get upgrade";

- SanDisk Extreme Pro 16GB fared much better, but still we had several failures after half-a-year;

- Failure mode in both cases - corruption in superblocks and inodes, journal doesn't help much when recovering (we use ext4).

As a result, we settled on splitting each card into two root partitions - active and standby. To upgrade, overwrite standby one with dd, switch active/standby by editing /boot/cmdline.txt, and reboot.

comment 10y ago · link · parent

Designed-for use-case for an SD card is a buffer where a photo/video camera will save footage sequentially, then you copy everything to your PC/laptop and reformat the card.

When used as a generic storage with a complex write/delete/overwrite pattern, most card would start corrupting data fairly quickly.

comment 10y ago · link · parent

I wonder how well would it perform when used in place of laptop's system disk (i.e. with tons of small files and very random read/write access patterns).

comment 10y ago · link · parent

Two hard things in computer science:

- cache invalidation: check (root cause of the actual bug);

- naming things: check (terrible name for an article, as others already pointed out).

comment 10y ago · link · parent

The only time I had to use (admittedly annoying) HP GUI installer is for scanner part of HP CM1015 MFP. Printer part of the same MFP worked fine with just normal CUPS.

comment 10y ago · link · parent

This 30-minutes-then-shutdown annoyance looks to be optional and disabled at the very least on the x230 machine that trmm is hacking on:

https://www.coreboot.org/pipermail/coreboot/attachments/2016...

If this will turn out to be something that could be reliably disabled on other laptops, this is going to be huge.

comment 10y ago · link · parent

"explanabrag", maybe?

https://www.youtube.com/watch?v=8_nMrJJFQ8s

comment 10y ago · link · parent

Atl-. will cycle through the n-th argument, which is not the same as repeating entire last command with all arguments as up-arrow or !! do:

  $ yum install bash-completion
  Error: This command has to be run under the root user.
  $ sudo <Alt-.>
  $ sudo bash-completion

comment 10y ago · link · parent

From fig. 1 on the second page of pdf linked by spenrose below, it looks like vapor cloud was more doughnut/torus-shaped than spherical (due to rotation) and lasted few tens of years.

comment 10y ago · link · parent

That is remarkably close to what this thing does.
12