mike-burns: http://www.meetup.com/The-Classical-Code-Reading-Group-of-Stockholm/ - we just read env(1). brycec: Dangit HE, get your act together and quit breaking your sea1 end tunnel routing! CaZe: mike-burns: I'm surprised you don't read the POSIX specification itself. mike-burns: Well then it'd be a spec reading group.
And then we'd miss out on the beauty that is FreeBSD's env(1).
(Highly recommended reading for "holy shit why did they do that?!" reasons.) CaZe: mike-burns: Reading an implementation is sort of pointless unless you read the spec that tells what the implementation is supposed to do.
mike-burns: Also, it's useful to see how different systems break from the spec. mike-burns: Reading an implementation is a great way to see how code is used in the real world. CaZe: Plus, the spec isn't very long. BryceBot: That's what she said!! CaZe: http://pubs.opengroup.org/onlinepubs/9699919799/ mike-burns: The spec and manpages come up.
In fact, the getenv(3) and environ(3) specs and manpages also came up. CaZe: Well, the manpage should be what documents how the system is breaking from POSIX. mike-burns: Sure. I suspect the OpenBSD manpage might actually do that, too.
The GNU one obviously just chastizes the reader for daring to use man(1) instead of info(1). CaZe: So you should really start by reading the POSIX spec, then reading the man page for each system, to see how each system is intentionally breaking the spec (if at all), and then reading the implementation to see how it's doing it. mike-burns: Attendees are welcome to understand the code in any manner they want. Most of them do what you said -- it's what I do, too.
Picture it more like a book club; people show up having read the material, and then we discuss it, citing the material. CaZe: The danger in just reading the implementation without looking at the spec first is that you might start to assume the spec specifies something that you see in the code, when it does not.
I mean, you get a lot of backwards reasoning. mike-burns: Sure yeah. CaZe: For instance, someone once was explaining that the reason that global variables are automatically initialized to 0 for you is because they're placed in the BSS section. mike-burns: Though since we read four (or more) implementations, we get a feeling for what people expect the program to do. CaZe: Totally backwards. mike-burns: Typically it is totally backwards! We discuss that every time, since the spec seems to be ignored by most implementors.
It's a fun event; you should pop by if you're ever in Stockholm while one is happening.
(Or in NYC, which now has its own version.) ***: mnathani_ has quit IRC (Ping timeout: 244 seconds) CaZe: mike-burns: This literally just happened in ##c:
04:30:50 <twkm> p->m is syntactic sugar for (*p).m
04:32:01 <Sergio965> It's not.
04:32:21 <Sergio965> It's syntactic sugar for something like *(p + offsetof(m))
04:47:42 <twkm> Sergio965: you are gravely mistaken.
04:48:04 <Sergio965> (*p).m would mean that the entire p struct is put on the stack.
05:25:48 <pragma-> p->m is indeed (*p).m
05:27:47 <Sergio965> Hmm, okay.
05:28:04 <Sergio965> (*p).m doesn't make a lot of sense in most architectures.
05:29:33 <Sergio965> How would I do (*p).m on, say, X86? Where would the *p go?
05:43:40 <Sergio965> Linux, for example, calculates the offset of a struct member and passes it around.
05:43:43 <Sergio965> Is that incorrect?
Literally divining the spec from an implementation.
And getting it wrong, of course. ***: jcv has joined #arpnetworks mike-burns: Ha. Happens all the time. mercutio: global variables are automatically initialised to 0?
that doesn't seem right to me. brycec: Not in C
Not unless your compiler is cleaning up after you anyways mercutio: it may work on linux.
doesn't ilnux zero pages before giving them to users now? -: brycec doesn't know mercutio: but yeah i wouldn't want to rely on it brycec: (But I'd bet "not.") mercutio: especially seeing those kinds of issues can be annoying to debug and there's no real performance improvement by doing such brycec: But it's not about performance, of course mercutio: it's harder to google for than i would have liked.
someone was asking why linux doesn't do zero-copy for network yet.
which is what i want
well zero-copy receive brycec: Wikipedia had more info than I expected it to. "The Linux kernel supports zero-copy through various system calls, such as sys/socket.h's sendfile, sendfile64, and splice. Some of them are specified in POSIX and thus also present in the BSD kernels or IBM AIX, some are unique to the Linux kernel API."
Granted that only mentions sendfile*
I imagine receiving to be a bit tricker mercutio: splice can't even do a write to disk based upon a descriptor you're reading from. brycec: (It's easy to offload sending - toss it away and forget. Receiving requires monitoring the receipt) mercutio: i hate the 16k read/write loop
or whatever size people decide to do
it just feels dirty. BryceBot: That's what she said!! brycec: BryceBot: ++ mercutio: and it means a lot more context switches
it's especially bad with network sockets as you often get dribs and drabs, and if you don't read from the socket then linux doesn't know to make the tcp window bigger.
so you can't easily just delay all your reading
it's a non issue on isdn/modems etc i reckon
but with adsl, vdsl, ethernet etc now days you get like one packet a msec or so.
with ethernet it's a little better as you can coalesce a little
with adsl/vdsl you can't really even coalesce.
so 1.5 mb/sec = roughly 1 packet a msec.
and the network side, and the program and the file system all have to deal with that brycec: interesting mercutio: i was playing with it for quite a while :)
i was actually mostly trying to see how little cpu i could get infiniband to use.
but i was testing on other speed connections at the same time. brycec: Ahh, makes even more sense. mercutio: and adsl used more cpu than i thought it should.
i am 50% of cpu compared to curl for a 10mb file over vdsl though :)
the strangest thing i found is that haswell is way faster than sandybridge for dumb downloading programs.
err than ivy bridge.
i7-3770 vs i7-4770 brycec: interesting. mercutio: there's hardly any benchmarks which would show it around
people are mostly testing more complex programs etc.
and mostly windows
but i think it's from faster cache/ipc
most benchmarks at least use ram
i'm actually pretty curious how things ilke php compared from ivy to haswell
and perl m0unds: ipc improvement benchmarks i've seen showed it to be ~5-10%
typically less than 10% in singlethreaded loads mercutio: that's average/overall m0unds: yep, because that's what tends to be tested mercutio: well yeah it surprised me
there's hardly any linux benchmarks around m0unds: there's not a lot of market for it mercutio: there's phoronix, but they still test lame things m0unds: esp w/desktop cpus
servers, maybe mercutio: deskto/server cpus are the same
basically m0unds: different sockets, chipsets, cache amounts, etc mercutio: it's not really a lot different other than the numa complciations
which only happens with dual cpu
well dual or more
numa is difficult to deal with though. that's why intel did really fast interconnects -- to minimise performance deficits.
when numa comes to desktops then i bet games wont' deal right :) m0unds: i don't think i've ever seen server testing w/e3 stuff since that's more of "workstation" cpu mercutio: yeah i'd ilke a recent e5 to compare
but they're really expensive
really slow too
well e5-2620 is expensive and slow i should say. m0unds: well, i'd assume you'd buy one if your workload benefits from higher cache and higher core count
and smp and more ram support mercutio: you usually buy one because you need the ram
e5-2620 is 6 core 2 ghz
so it's worse than 4 core 3 ghz
but costs like twice as much as e3
then youu have the mbd cost.. m0unds: compare it to a similar generation hexacore i7 then mercutio: e5 does add some stuff m0unds: that was my point, it's not apples/apples mercutio: direct i/o or something
yeh
a lot of the improvements go hand in hand for server/desktop though
and desktop is usually quicker to market than server
that said, software can improve performance more than generational steps normally
like it should be possible to half the cpu usage of curl dne: mercutio, brycec: https://en.wikipedia.org/wiki/.bss#BSS_in_C BryceBot: .bss :: In computer programming, the name .bss or bss is used by many compilers and linkers for a part of the data segment containing statically-allocated variables represented solely by zero-valued bits initially (i.e., when execution begins). It is often referred to as the "bss section" or "bss segment". Typically only the length of the bss section, but no data, is stored in the object file. The program loader allocates and... mercutio: interesting
more and more people just zero data just in case i think
like i wouldn't be surprised if malloc came back with zeros
it may be different when you're freeing and allocating again though
did anyone hear about how i think it was rackspace didn't zero their users data
so when people brought up a new vm they could read the filesystem data still on file system from previous user dne: wasn't it digitalocean? mercutio: it was rackspace or linode
but digitalocean may have had the same issue
damn i'm struggling on my google
yeah can't find it dne: https://github.com/fog/fog/issues/2525 mercutio: i expect it's actually quite common
i wonder if solusvm does
that looks like an api issue, this was with normal provisioning/deprovisioning. dne: yeah the api had a stupid default ***: _Zodiac has joined #arpnetworks
_Zodiac has left acf_: found out rtlwifi handles DHCP and ARP strangely
it always sends them at the lowest TX rate
does that seems strange to anyone else?
it has code that checks the port number in UDP packets for 67 / 68 mercutio: oh weird, do a lookup on google.
with the .
acf: maybe it's trying to make sure they get through
or maybe it just scales transmit speed up as you do more data
probably trying to maximise the chance of it working
i hacked arping to do flood arp requests once.
to check arp performance
it was years ago, arp used to be really unoptimised.
if possible change wifi cards though
you can get ac7260s pretty cheap
you can get stuff like 4965agn even cheaper
http://www.ebay.com/itm/4965-4965AGN-wireless-WiFi-Mini-PCI-E-card-802-11N-AGN-N-for-Intel-/261318790911?pt=LH_DefaultDomain_0&hash=item3cd7d04eff
like $5.60 usd :)
there's an inbetween that's like $10 too i think
http://www.ebay.com/itm/Intel-7260-HMWG-WiFi-Wireless-AC-7260-Dual-Band-AC-Bluetooth-BT-mini-pcie-card-/251591164998?pt=LH_DefaultDomain_0&hash=item3a94008446
looks like $32.90 usd for 7260. but that'll do ac.
that said hp laptops blacklist, maybe some other things do too m0unds: i picked up a doxie scanner for digitizing important records. it's pretty snazzy. mnathani: what's a doxie scanner?
@google doxie scanner BryceBot: 15,200 total results returned for 'doxie scanner', here's 3
Doxie - Wireless & Mobile Document Scanners (http://www.getdoxie.com/) Scan anywhere with Doxie mobile scanners. With rechargeable, wireless scanners and amazing software, Doxie delivers paperless for everyone.
Doxie Go - Rechargeable Mobile Document Scanner: Office Products (http://www.amazon.com/Doxie-Go-Rechargeable-Document-Scanner/dp/B0053TRH2M) Doxie Go delivers smart and simple scanning you can take anywhere - no computer required; Doxie's tiny size makes it easy to scan documents at your desk or ...
Doxie Go Plus & Doxie Go Wi-Fi - Rechargeable Wireless Portable ... (http://www.getdoxie.com/product/doxie-go/) Doxie is a new kind of scanner you can take with you, with a built-in battery, memory, and Wi-Fi. No computer required – scan anywhere, then sync to Mac, PC, ... m0unds: ^
little portable ADF scanner
i got the go wi-fi version, has built in wireless and onboard storage
can run without a wall wart, stores scans locally and you grab them from the device either via usb or wifi mnathani: Neat brycec: m0unds: Used any of their apps? Decent? m0unds: my wife scanned something to her ipad and it worked pretty effortlessly
the desktop app on windows is pretty functional. shows scans in a gallery sort of thing, has a slider for zoom level. you click import after connecting to the scanner or plugging it in via usb and it just grabs all the scans from it automatically brycec: (my mother keeps insisting she "needs" a Neat-o or similar, except apparently they suck so I keep shooting her down) m0unds: the base model doxie is like $80 on amazon i think
it can do OCR via some third party library built into the software if you want that sort of thing
doesn't have any filing support or anything built in (not sure if the neato stuff does that) -: brycec still isn't so sure his mom needs one, but at least this isn't terrible BryceBot: That's what she said!! m0unds: haha
if you have a .edu email, they offer a 30%-ish discount
if you buy direct, anyway
i really wish we would have gotten this thing when my wife was finishing up her MSN. i had to scan so much crap w/a flatbed canon w/flaky TWAIN drivers
OH? YOU HAVE MORE PAGES TO SCAN? I BELIEVE THE SCANNER HAS DISCONNECTED SO I'LL GO AHEAD AND CRASH, LOL. brycec: LOL
Also, MSN? (in this context) m0unds: oh, nursing
she's a nurse practitioner
finished in may of last year, took 6 mos to credential her and she works as a provider in an emergency dept now
worked there as an RN since 2005
when she was finishing up school, she had tons of clinical hour logs and other stuff that had to be scanned in (probably 150pp of stuff) brycec: @wiki Master of Science in Nursing BryceBot: Master of Science in Nursing :: A Master of Science in Nursing (MSN) is an advanced-level postgraduate degree for registered nurses and is considered an entry-level degree for nurse educators and managers. The degree also may prepare a nurse to seek a career as a nurse administrator, health policy expert, or clinical nurse leader. The MSN may be used as a prerequisite for... http://en.wikipedia.org/wiki/Master%20of%20Science%20in%20Nursing brycec: Ahh m0unds: The MSN may be used as a prerequisite for doctorate-level nursing education, and previously was required to become an advanced practice registered nurse such as a nurse practitioner, clinical nurse specialist, nurse anesthetist, or nurse midwife. BryceBot: That's what she said!! m0unds: ..."previously" is sort of erroneous, since it's still a requisite, haha acf_: mercutio: I think most laptops in the US have a card whitelist
it might even be a legal requirement
I tried several different cards in the box
but the Linux Realtek drivers suck
/*sleep after linked 10s, to let DHCP and 4-way handshake ok enough!!! */ brycec: Supposedly it's a requirement for FCC certification. Mass-produced systems must stick to the tested specifications, hence the whitelist. However build-to-order systems typically don't have that stipulation and lack the whitelist.
(At least that's what I've heard from solid sources talking about Lenovos) acf_: I use exclusively Thinkpads
afaict, they all have a whitelist
but some have a handful of cards in the whitelist
I recently got a Thinkpad X130e brycec: ^ I have one! :D
It's sitting right beside me acf_: use Linux on it? brycec: Yes acf_: is it the AMD variant? brycec: No, Intel acf_: well that's why brycec: (I thought the 120e was AMD)
what's why? acf_: it works :P
the X130e came in Intel and AMD brycec: Are you saying that yours doesn't work at all? (did I miss something?)
Mine has a whitelist too :( acf_: all of the devices have suckey Linux support
it has a Realtek wlan and a Connexant sound card
the AMD-E300 CPU can't play 720p videos in Chromium brycec: Intel sound and Realtek RTL8188CE here, and no performance issues :) acf_: that's the same wlan card I have
are you using the stock driver in your kernel? brycec: Yep
It frankly "just worked" acf_: hmm.. mine likes to drop packets marked as "special" by the driver brycec: Currently 3.18.6, but I've been using it for awhile acf_: I was testing on 3.16 and 3.19
3.19 treats all IPv6 packets as special
and sends them at the lowest data rate
or in my case, drops them staticsafe: o_O acf_: interesting to know that it works on some hardware brycec: fwiw from my dmesg, "ieee80211 phy0: Selected rate control algorithm 'rtl_rc'" acf_: same here mercutio: my hp is really old and has intel 4965agn
which is really early n
but it sitll does 300 megabit 5 ghz and 150 megabit 2.4 ghz
or 144 megabit 2.4 i think m0unds: 20:02:58 ⤷ | the AMD-E300 CPU can't play 720p videos in Chromium ---- is HW acceleration not working or something?
i have an amd NEO based netbook (even wimpier than the E300) and it can handle 720p video via HTML5 or flash just fine, so long as that's all i do on it acf_: hmm
I forced chromium to enable hardware acceleration
even though it didn't want to
that works kind of, as long as I don't have too many tabs open
it's terrible without hardware acceleration
it just kind of bothers me that my X61s is way faster mercutio: i find chrome works better withoutu hardware acceleration
it seems to leak memory on hardware acceleration acf_: it crashes my graphics driver on my X61s mercutio: oh you have a really weak cpu BryceBot: That's what she said!! acf_: if hardware acceleration is enabled mercutio: oh m0unds has a really weak cpu acf_: opengl things won't work anymore if I try to play a video in chromium mercutio: i just play videos in mplayer m0unds: mercutio: yep, that thing was awful. mercutio: i've never found video playing on web browsers to work well in linux.
youtube-dl is handy if you want to dl youtube videos m0unds: i only used it as a disposable toolkit laptop. i ended up nuking arch and just ran some bsd on it with no gui mercutio: my chromebook seems to go okish with web
except scrolling is a bit jerky m0unds: video bios had a bug that the windows drivers worked around, but all linux stuff would cause display corruption unless i disabled hw acceleration
then it just ran dog-ass slow mercutio: eek m0unds: so it was pointless to run anything but cli or windows on it acf_: what model laptop was it? m0unds: i think it has netbsd on it atm
some acer thing that i paid like $100 for on sale
11.6" display, it was tiny and i only bought it to have it instead of my work laptop which was way too big
because some idiot thought a 17" notebook was the best idea ever for a portable machine to take outside and stuff
weighed like 11lbs without a battery mercutio: m0unds: that's why i like my chromebook
it's nice being so tiny
lugging my laptop around is a pita
i think my laptop is 15"
it's also damn noisy though. fans clog up on laptops
and it's a pita to clean staticsafe: i have a T530 mercutio: http://www.muamat.com/adpics/4ef5ba55105df6bbb1a537927.jpg
i h ave something that looks kind of like that
http://www.cnet.com/products/hp-elitebook-8530p/specs/
think it's eotmhing like that
1680x1050. cheap laptops are always 1366x768 now
hmm this suggest it's 14"
so maybe i'd find a 13" large too
actually it's fat as well as big acf_: brycec: I assume you use IPv6 over that RTL8188?
IPv4 seems to work okay under the 3.18 driver
but not IPv6 (for me) brycec: Yes I do. acf_: have you done any IPv4 vs IPv6 TX speed testing? ***: mnathani_ has joined #arpnetworks brycec: Have not, no.
I frankly don't expect "blazing speeds" from wifi
not with 40+ other networks around me acf_: ah, got it
thanks for the info though brycec: yep, np mercutio: combined upload/download wireless can easily struggle :(
if using as ethernet replacement ***: mister has joined #arpnetworks
mister has left