Progrider

Programming discussion

Posts by nils !PxNS1ZCy

22 public posts under this tripcode. The code after the name can only come from the secret its owner types, so these posts share one author.

PostPosted
Help · post #4

Map's fine. If you ever want smoother than a fixed window, a token bucket's only about five more lines. Probably don't need it.


by nils !PxNS1ZCy
Help · post #4

Postgres people: timestamptz doesn't store a time zone, it stores UTC and converts on the way out. That confuses somebody on every team I've ever worked on.


by nils !PxNS1ZCy
Findings · post #1

Same service as my timeout post, because I evidently learn one lesson at a time. pprof showed a steady climb of readLoop and writeLoop goroutines. That's two per open connection. Any path that returne…


by nils !PxNS1ZCy
Help · post #4

Go sets TCP_NODELAY for you by default, so a lot of people have never seen it.


by nils !PxNS1ZCy
Help · post #2

Nagle plus delayed ACK. The first write goes out, Nagle holds the second until the first is ACKed, and the other side delays the ACK, 40ms is Linux's minimum. Either setsockopt TCP_NODELAY, or better,…


by nils !PxNS1ZCy
Help · post #3

Same as the Go thing from earlier. No default timeout, so always set one.


by nils !PxNS1ZCy
Findings · post #4

The rule I've settled on: if a shell script grows functions that return status, it's time for a different language.


by nils !PxNS1ZCy
General · post #2

Both. mosh to survive the tunnels, tmux on the far end for scrollback and to keep state if the client machine goes away. Remember mosh wants UDP 60000-61000 open.


by nils !PxNS1ZCy
Findings · post #3

No. Plenty don't. Python requests has no default timeout either. Always check.


by nils !PxNS1ZCy
Findings · post #1

Service froze up overnight. Goroutine dump showed hundreds stuck reading a response from one partner API that had accepted the connection and then gone quiet. http.Get uses the default client, and its…


by nils !PxNS1ZCy
Help · post #12

Off. All good now, marking this one resolved.


by nils !PxNS1ZCy
Help · post #10

880ms. Old package was built without LLVM support, turns out. Debian's has it.


by nils !PxNS1ZCy
Help · post #8

Top of it is: JIT: Functions: 42 Options: Inlining true, Optimization true, Expressions true, Deforming true Timing: Generation 8.1 ms, Inlining 310.2 ms, Optimization 612.4 ms, Emission 201.9 ms, Tot…


by nils !PxNS1ZCy
Help · post #6

Back to 20ms on most of it. Thanks. Still one report query that's slower than before, 2s where it was 900ms.


by nils !PxNS1ZCy
Help · post #4

Running. There's a line about it in the output I had scrolled past.


by nils !PxNS1ZCy
Help · post #3

Oh.


by nils !PxNS1ZCy
Help · post #1

Upgraded a small Postgres box over the weekend with pg_upgrade --link. It came up fine, no errors. Queries that took 20ms now take 8 seconds. Same hardware, same config carried across. One example doe…


by nils !PxNS1ZCy
General · post #6

Its transaction() helper has .immediate() on it. The default is deferred. node:sqlite you'd write it yourself.


by nils !PxNS1ZCy
Handoffs · post #2

unbound-checkconf on the generated file before the reload would catch the worst of it.


by nils !PxNS1ZCy
General · post #9

For the record here's what the whole thing actually is: # backup.service [Service] Type=oneshot ExecStart=/usr/local/bin/backup.sh # backup.timer [Timer] OnCalendar=--* 02:15:00 Persistent=true Random…


by nils !PxNS1ZCy
General · post #12

Perl CGI guestbook. Took about a week before somebody put a script tag in it, which is how I learned about escaping.


by nils !PxNS1ZCy
Help · post #2

Staged is good news. git add wrote the blobs into the object store, they just have no name now. git fsck --lost-found Then look in .git/lost-found/other. You get the contents without the filenames. Do…


by nils !PxNS1ZCy
All times shown in UTC.3 topics, 19 replies