23 ms·
I/O Is Faster Than CPU – Let’s Partition Resources and Eliminate OS Abstractions [pdf]
- yingw787 8y agoThere was a great blog post I read a while back about constructing a caching layer across network by Dan Luu: https://danluu.com/infinite-disk/ https://danluu.com/infinite-disk/ I asked a friend who works in a quant firm and he was like yes it’s true, and it is pretty insane. I think there’s research Microsoft and Google are doing for RDMA over 100G Ethernet for intra data center communication as well. Pretty neat.
- HillaryBriss 8y agoneat blog post! i like the table at the top comparing latencies. at one point the post says: I'm paying $60/month for 100Mb, and if the trend of the last two decades continues, we should see another 50x increase in bandwidth per dollar over the next decade. he seems to have more confidence in his bandwidth provider than I have in mine!
- baybal2 8y agoI worked on something similar like that 3 years ago as a sub-sub-subcontractor for a company making DCs for Alibaba. It took them almost 2.5 years since me signing off on work to roll it out in a limited commercial trial in their alicloud hosting. The original idea was to let purpose made hardware be distributed across DC rather than every server having to carry it: video codecs on FPGAs, hardware wire speed crypto/compression, databases and k/v stores exposed over RDMA, and remote block storage on SSDs. I was invited to the opening ceremony for the DC. When company's bosses were showed sfx infused 3D graphs allegedly representing their AI things running on it, I was unable to restrain myself from ruining the atmosphere by asking how it is running when all servers in the DC were shut down :D
- theincredulousk 8y agoYes! Was surprised the paper didn't specifically mention RDMA, or to a lesser degreee SRIOV, with all their focus on NICs. Also, there may be ongoing research, but it isn't theory at all. HPCs, HFTs, and the could providers have been leveraging RDMA for a long time - e.g. Infiniband. Doing it over Ethernet (RRoCE) is relatively new, and it isn't necessarily any big leap that is happens over 100G instead of 40 or 1. However, an interesting point as network links go to 100G+ (esp. for RDMA) is again on the storage/processing side. E.g. a wireshark capture on a 100G connection? ~12.5 GB/second, near max bandwidth for DDR3, and can fill 64GB of RAM in about 5 seconds at full fire-hose. So again the hot-potato of bottleneck will be passed, at least for maximum sustained performance situations. Side note, AFAIK RoCE exists mostly due to non-technical arguments, particularly the inertia created by existing familiarity and deployment of Ethernet in data centers. I think Microsoft was the one flexing on a standards-body to push it through. It is somewhat of a kludge as Ethernet wasn't designed with RDMA in mind - no guaranteed predictable latency, frames can and will disappear if switch buffers overflow, etc. So IMO "research" into the topic isn't super profound - akin to studying how your sedan might be heavily modified to go off-roading almost (but not quite) as well as a pick-up truck. Even now many that have the luxury are just going Infiniband from the get-go if RDMA/latency are the key priorities rather than tacked on later.
- Veedrac 8y agoThe paper does mention RDMA.
- AtlasBarfed 8y agoall that huge scale distributed storage is going to run into CAP concerns with imperfect network links, nodes, storage units. I get a lot of that is consumer/social network crapdata with low guarantees to the end user. Dropbox would probably like a little more of a guarantee, and enterprise even more so.
- bhouston 8y agoVery interesting shift that happened over the last 2 decades. We likely haven't designed OSes or CPUs to match this new reality.
- ajross 8y agoLargely because it's not really a new reality. IBM faced the same issues on the 360's half a decade (edit: sorry, century!) ago -- you could stream data off of stacked platters in a drive into core much faster than a CPU could manage the copy. And the solution was to invent "I/O Channels", which were early DMA controllers. And the VM layer (when it was added) was cognizant of this stuff, so applications could be written directly to the channel interface. There's nothing new under the sun, basically. It's an Ecclesiastes design. I haven't read through the whole article, but my guess is that the "parakernel" interface the authors are positing is going to look a lot like the IBM Channel interface.
- drfuchs 8y agoI think you mean “half a century ago”.
- pjc50 8y agoIs there a good concise explanation of the 360 architecture available on the web? It seems historically important but I've not seen such a thing.
- MagicPropmaker 8y agoWhy, yes there is! The IBM 360 Principles of Operation. When I got my C.S. degree we spent a whole semester studying this. http://bitsavers.trailing-edge.com/pdf/ibm/360/princOps/A22-6821-0_360PrincOps.pdf http://bitsavers.trailing-edge.com/pdf/ibm/360/princOps/A22-...
- stormbeard 8y agoThis is a treasure trove of information; however, it's not what I would call concise. Did you run across anything else to supplement this during your program?
- Blackstone4 8y agoDoes this mean we go from virtual machines (i.e. VMWare) to kubernetes & containers in data centers? Something similar to RanchOS
- SteveNuts 8y agoEven VMWare has support for running containers on their platform now, so yeah probably. Cisco Nexus switches can run Docker workloads also.
- ori_b 8y agoIt means you go from an OS that provides complex drivers to one that barely provides drivers -- essentially muxing the raw hardware between processes.
- donaldihunter 8y agoYep, https://en.wikipedia.org/wiki/Data_Plane_Development_Kit https://en.wikipedia.org/wiki/Data_Plane_Development_Kit is used for NIC offload to userspace
- donaldihunter 8y agoAnd https://superuser.openstack.org/articles/vpp-vswitchvrouter-openstack/ https://superuser.openstack.org/articles/vpp-vswitchvrouter-... for userspace packet processing.
- closeparen 8y agoKubernetes predecessors like Mesos/Aurora tend to already run on metal, but workloads are still going through the kernel for I/O. To take advantage of this, you would expose NICs and SSDs directly to applications, potentially bypassing the controls currently offered around containers (because these are enforced in the kernel).
- oblio 8y agoIs this true for most real life workloads? There's that famous rule-of-thumb indicator for latencies: https://www.prowesscorp.com/computer-latency-at-a-human-scale/ https://www.prowesscorp.com/computer-latency-at-a-human-scal... It doesn't seem to be that the orders of magnitude are so close as to require totally rethinking mainstream kernels. Or am I looking at this the wrong way?
- jcranmer 8y ago> Is this true for most real life workloads? No. It's true if you care about NVMe drives, or high-speed networking--which is to say, it's true if you care about a few kinds of server workloads, but it's absolutely not true for most consumer hardware.
- blattimwind 8y agoNVMe drives with transfer rates of several gigabytes per second are mainstream now.
- wtallis 8y agoIn consumer use cases, it is common to see the storage bottleneck be the CPU rather than the SSD. Firing up a video game isn't much faster on an Intel Optane NVMe SSD than on a SATA SSD, because the data on disk has to be decompressed and parsed on the CPU before it is usable. A lot of software is still written under the assumption that the disk is slow, and that capacity is somewhat limited. Taken together, those assumptions usually lead to single-threaded loading and decompressing/parsing on the same thread that makes the system calls for IO.
- ianai 8y agoA quick google found the following link. It makes it look like 100gb IB can be about 1 order of magnitude faster than Ethernet - around or less than 1 us. But IB can do RDMA, so that further reduces latency. http://sc16.supercomputing.org/sc-archive/tech_poster/poster_files/post149s2-file3.pdf http://sc16.supercomputing.org/sc-archive/tech_poster/poster...
- jandrewrogers 8y agoAt least in database kernels, we noticeably reached this threshold around five years ago with typical server hardware. This is an interesting computer science problem in that virtually all of our database literature is based on the presumption that I/O is much slower than CPU. If you cleanroom a database kernel design based on the assumption that I/O performance is not the bottleneck, you end up with an architecture that looks very different than the classic model you learn at university. It is always a tradeoff of burning a resource you have in abundance to optimize utilization of a resource that is scarce, and older database architectures are quite wasteful of resources that have become relatively scarce on newer hardware.
- aloer 8y agoWhat was the situation like before SSDs? Were the fastest hard drives at the time (15k rpm?) faster than the fastest CPUs?
- insulanus 8y agoLet's take a look at the throughput of a server hard disk vs. a typical server CPU: https://serverfault.com/questions/190451/what-is-the-throughput-of-15k-rpm-sas-drive https://serverfault.com/questions/190451/what-is-the-through... https://www.anandtech.com/show/9185/intel-xeon-d-review-performance-per-watt-server-soc-champion/6 https://www.anandtech.com/show/9185/intel-xeon-d-review-perf... Now, that 45.8 GB/sec can't usually be fully utilized by the application, but it's a lot higher than the 200MB/sec of the server hard drive. There's also the complication of RAID, max memory fetch rate of a single core, etc. And the fact that the database has to do some processing besides moving data around. But it seems to me that server CPU bandwidth of the last generation is significantly higher than spinning disks.
- blihp 8y agoIndividually no, collectively (i.e. storage arrays) yes.
- loeg 8y ago
- agumonkey 8y agoAre we going to have transputers ? :)
- pjc50 8y agoInteresting. It's long been the case that a "computer" pretends to be a single processor to the programmer while in fact being a cloud of semi-general processors which communicate through messages. This makes that completely explicit, giving the programmer all the power and hassle involved in speaking as directly to the devices as possible while maintaining isolation. Similar esoteric architectures are already available (e.g. Tilera, or all the way back to the Inmos Transputer). Given the allocation of particular hardware devices - NIC, RAM, NVMe - to particular processors running a (static?) application process, it's not clear how the filesystem abstraction would work or whether that's simply delegated to the application. This is very definitely a server-focused system as no mention is made of GPUs or interactive devices.
- the8472 8y agoDon't kTLS sockets[0] with crypto offloading[1], sendfile/vmsplice, device-to-device DMA transfers[2] and possibly io_uring solve all those things on linux? Granted, they're not POSIX, but they're incremental extensions. Netflix implemented similar extensions in freebsd[3] [0] https://www.kernel.org/doc/Documentation/networking/tls.txt https://www.kernel.org/doc/Documentation/networking/tls.txt [1] https://lwn.net/Articles/734030/ https://lwn.net/Articles/734030/ [2] https://lwn.net/Articles/767281/ https://lwn.net/Articles/767281/ [3] https://people.freebsd.org/~rrs/asiabsd_2015_tls.pdf https://people.freebsd.org/~rrs/asiabsd_2015_tls.pdf
- loeg 8y agoNot really. These are all incremental performance improvements on POSIX but don't address the author's concerns / desires in the paper. All of them continue to require the kernel to mediate IO between userspace and the hardware. For some reason the author is fixated on direct user access to partitioned hardware queues. Netflix's CDN operating system is based on FreeBSD, and they did add a kind of kTLS implementation, but they did not add it to FreeBSD upstream for a host of reasons.
- the8472 8y agoThe means may be different, but the ends they aim for seem to be similar. The ends here are improved latency, throughput, parallelism, non-blocking APIs and security. The above-mentioned improvements aim to address the first four without completely bypassing the kernel, instead changing APIs so they step out of the way most of the time, limiting them to coordination tasks and then either offloading to the hardware or directly piping the data to/from userspace mappings without additional context switches where needed. VMs using SR-IOV address the security aspect. It's basically the difference between a green field design and tacking all those innovations onto the glueball that is linux. The latter may be ugly and complex, but it has the advantage of being backwards-compatible.
- loeg 8y ago> It's basically the difference between a green field design and tacking all those innovations onto the glueball that is linux. The latter may be ugly and complex, but it has the advantage of being backwards-compatible. I'm definitely not trying to argue in favor of the paper's opinion. :-) I just believe the author of the article would disagree that the glueball your earlier remarks describe addresses the author's concerns. They specifically say that Linux cannot be fixed to their satisfaction, or at least argue that idea. Look for the section on page 5 headed, "Why not use kernel-bypass techniques on Linux?"
- ktpsns 8y agoStrictly speaking, the sentence "I/O is faster then CPU", aka "memory access is faster then computations" is nonsense, because it compares apples with bananas. One could probably say "transfering x data between CPU and SSD is faster then performing the computation f(x) on the CPU", where still f remains undefined.
- deleted 8y ago[deleted]
- otterley 8y agoThe issue being discussed in the article and amongst OS designers is that I/O throughput volumes being seen in the wild today are unable to be accepted in real time (i.e., without significant queueing delays) by otherwise unloaded CPUs.
- masklinn 8y agoYou're misreading the article. Its subject is that because of the way IO stacks have been built CPUs are becoming the bottleneck in IO, this is an issue for both network and non-volatile storage IO e.g. > a 40 GbE NIC can receive a cache line sized packet every 5 ns, but the last level cache (LLC) access latency is already up to 15 ns, which means a single LLC access can already prevent the OS from keeping up with arriving packets and > NVMe SSDs perform I/O faster than the OS can accept new (asynchronous) I/O requests and notify their completion. They also note e.g. that while nvme provides for 65k command queues OS generally have one IO queue per CPU.
- jeanmichelx 8y agoLatency ≠ throughput
- masklinn 8y agoThe LLC access is a sequential cost to processing the packet.
- 8y ago
- toolslive 8y agothe OS kernel has been the problem for quite a while now.
- sara7262 8y agoSometimes our feet smell are so bad even we feel ashamed due to our feet smell Now you can get rid from this just follow this simple method https://zoomtips.blogspot.com/2019/04/Smelly-feet.html https://zoomtips.blogspot.com/2019/04/Smelly-feet.html Guy made world record He drive car on two wheels See his video how he is driving http://bit.ly/2ZOYaWX http://bit.ly/2ZOYaWX See the friendship between cat and squirrel That's so cute see how much they are taking care of each others http://bit.ly/2VdHs4E http://bit.ly/2VdHs4E
- ObscureScience 8y agoI apologize for not reading much of it yet, but could someone give a quick comparison to the exokernel idea?
- cardiffspaceman 8y agoIt's in the article
- _0ffh 8y agoThe parakernel does not multiplex resources that are partitioned to allow applications to maximize the performance obtained from the underlying hardware. For multiplexed resources it looks much the same to me.
- bluetomcat 8y agoWe need entirely new OS abstractions to replace the dated notions of hierarchical file systems built around the metaphor of file cabinets, I/O as streams of bytes, terminals, process hierarchy. Essentially, say goodbye to the Unix model after 50 years. It would open up an entirely new world of software experimentation and craftsmanship.
- Ericson2314 8y agoAmen to that. Unix was never a good design, and now is severely out of date. We can no longer afford to hack around it.
- jaas 8y ago"Unix was never a good design" Nothing's perfect. Unix was a great design that served its purpose well for a long time, and evolved a bit along the way. Saying it was "never good" is trivializing and, in my opinion, arrogant.
- dllthomas 8y agoThere were always objections. "Unix went from being the worst operating system available, to being the best operating system available, without getting appreciably better." https://news.ycombinator.com/item?id=19416485 https://news.ycombinator.com/item?id=19416485 Which isn't to say that those POV were necessarily correct, just that it isn't all hindsight.
- the_af 8y agoTo be fair, there are always objections to any working piece of technology. It's not helpful to claim "it was never good design". It was a working design that drove technology to the point it is now, and in that sense it was hugely successful. What kind of perfect and pure tech do some people want, anyway? Pick anything, whatever they like -- say, Plan 9 or OS/2 or whatever -- and I can bet you in a parallel universe where that tech won, someone on para-HN will claim that it sucked and it was never a good design and if only Unix had won.
- racuna 8y agoOn Exadata architecture (and the recent versions of Oracle Database) the search is made by the hardware, not the software. I'm not a fan of Oracle, but things like that are awesome.
- vetinari 8y agoReally? What I vaguely remember that the storage nodes were embedded linux boxes. Yes, they understood indices and would return only minimum needed, but it was still software.
- Ericson2314 8y ago> A prototype parakernel written in Rust is currently underdevelopment ...Where?
- sara17378 8y agoSometimes our feet smell are so bad even we feel ashamed due to our feet smell Now you can get rid from this just follow this simple method https://zoomtips.blogspot.com/2019/04/Smelly-feet.html https://zoomtips.blogspot.com/2019/04/Smelly-feet.html Guy made world record He drive car on two wheels See his video how he is driving http://bit.ly/2ZOYaWX http://bit.ly/2ZOYaWX See the friendship between cat and squirrel That's so cute see how much they are taking care of each others http://bit.ly/2VdHs4E http://bit.ly/2VdHs4E
- laythea 8y agoThis is kinda like what they did in the graphics API world. Moving from OpenGL to Khronos in order to "cut the fat" between the user program and the hardware.
- ambrop7 8y agos/Khronos/Vulkan/
- samzevo 8y agohttps://coincircle.com/l/SNHAky12MH https://coincircle.com/l/SNHAky12MH
- phkamp 8y agoCongratulations! You have reinvented the Mainframe Channel Processor! Your next challenge: Try to avoid reinventing the 3745 Frontend Processor.
- thaumaturgy 8y agoThe paper reads like it's suggesting moving the burden of complexity in dealing with varying hardware interfaces from the kernel to userland so that userland can take direct advantage of higher performance hardware when it's available. I could see that for some very small niches, but in general I think it would be a terrible development for the industry. Hardware vendors don't like to share. They don't share code, they don't share common interfaces, they don't even share documentation. As it is now, these are all problems which most userland developers don't have to care about -- those problems get dealt with in the kernel, by developers who specialize in building support for uncooperative hardware. The average application developer doesn't want to have to figure out how many queues are supported by a NIC just to open a connection on the network. Further: the average application developer isn't experienced enough to do this correctly. Given the niche where these tradeoffs make sense, I'm not sure why the paper bothers to emphasize security at all.
- johnm1019 8y agoDisclaimer: IANA kernel developer. Is there any benefit to having those specialized developers create frameworks or libraries in Userland which other developers can leverage? This way they remain the interface to uncooperative hardware, but the code is in Userland so the bold folks can try their own approach.
- Q6T46nT668w6i3m 8y agoI enjoyed the paper. My impression is that you’d shift the burden to the runtimes that, for many applications, currently sit between POSIX and applications (e.g. see the Q&A about POSIX).
- loeg 8y agoIs this like the academia equivalent of an op-ed? No methods, no data, just opinion based on some recent trends?
- scott_s 8y agoThat's not a bad way of thinking about it. The HotOS workshop is not a place where people publish completed work, but rather present new, early-stage ideas. From the call-for-papers (https://hotos19.sigops.org/cfp.html https://hotos19.sigops.org/cfp.html): > We solicit position papers that propose new directions of systems research, advocate innovative approaches to long-standing problems, or report on deep insights gained from experience with real-world systems. We seek early-stage work, where the authors can benefit from community feedback. An ideal submission has the potential to open a line of inquiry for the community that results in multiple conference papers in related venues, rather than a single follow-on conference paper. The program committee will explicitly favor early work and papers likely to stimulate reflection and discussion over mature ideas on the verge of conference publication.
- inetknght 8y agoLook to GPUs for better solutions: make more discrete -- less functional overall but higher performance -- cores, and move them closer to the data; then let the CPU just handle coordination of the discrete processors. Think of SIMD but on a massive scale. Think of blocks of RAM with math processors. Or the same in your NVMe/NIC/etc.
- gmueckl 8y agoHP announced their ambition to do that a few years ago, framing it as a grand vision of the future of computing. I haven't heard anything since. This kind of offloading or distributed computing isn't quite a new idea, but it hasn't materialized yet. I suspect that it is too tough a nut to crack for the general case.
- inetknght 8y agoMy understanding is that GPUs have moved toward what I described: thousands of discrete cores with large amounts of math performance but generally terrible (or even non-existent) branching...
- gmueckl 8y agoAnd transferring data to and from the GPU is also a source of overhead.
- inetknght 8y agoDespite having an overhead of transferring data to and from the GPU: it's still faster to move the data to the GPU and let the GPU process it locally than it is to leave it in main RAM away from the processing. Transferring data to and from the CPU is also a source of overhead; even your CPU has cache to bring the data more local. So what's your point?
- gmueckl 8y agoWhatnyounsay is not true as a blanket statement: the overhead for transferring data to GPU memory is higher than accessing main memory from the CPU, so depending on what you do, the data transfer to the GPU might not result in a performance gain at all.
- Animats 8y agoMainframe designers had this problem under control by 1970. Mainframes had, and have, "channels". A channel is part of the processor architecture. It takes commands, sends them to a peripheral, and manages the data transfer in both directions. Channels have some privileged functions through which the OS tells them where the data is supposed to go in memory. The architecture of channels is well defined, and peripherals are built to talk to channels. The CPU has I/O instructions to control channels in a well defined way. The peripheral never has access to main memory. There is no peripheral-controlled "direct memory access" (DMA). So it's possible to give control of a channel to a userland program without a memory security risk. Minicomputers of the 1970s had low transistor counts and slow CPUs. So peripherals were usually put directly on the memory bus, with full access to memory. I/O operations were performed by storing into memory addresses, which caused bus transactions detected by the peripheral device. There were no CPU I/O instructions. Microprocessors copied the minicomputer model. IBM's people knew this was a bad idea, and in the IBM PS/2, they introduced the "microchannel". Peripheral vendors, facing a new architecture that required more transistors, screamed. IBM backed down and went back to bus-oriented peripherals. That model persists today, even though the few thousand transistors required for a channel controller are nothing today. Even though most modern CPUs have I/O channel like machinery, it's exposed to the program as registers the program stores into and memory accesses by the peripheral device. So there's no standardization on how to talk to devices at the hardware level. Some CPUs have protection systems, an "I/O MMU", and there have been various channel-like interfaces, especially from Intel, but they have never caught on. Instead, we mostly have heavy kernel mediation between the hardware and the user program. And way too many "drivers". This has become a problem with "solid state disk", which is really a random access memory device that doesn't write very fast. Mostly, it's used to emulate rotating disks. Samsung makes a key/value store device which uses SSD-type memory devices but manages the key/value store itself. But you need a kernel between the device and the user program. You can't just open a channel to it and let the user program access it.
- yjshtjsbdi 8y agoIzzy_rejtbekd
- ketralnis 8y agoA real world example at Alipay: https://news.ycombinator.com/item?id=17814185 https://news.ycombinator.com/item?id=17814185
- sly010 8y agoIsn't the BPF infrastructure an example of this idea?
- kaetemi 8y agoSo... separating the data and control planes?
- MrTonyD 8y agoWell, I spent a number of years writing drivers for PC systems. Some years the I/O chips were faster than CPU, and some years the CPU was faster than I/O chips. DMA was usually slower, just because release cycles for CPUs tended to be faster than release cycles for I/O controllers. Eventually, most driver writers decided that it was usually better to use CPU, even if the I/O controller was faster. That way, when the CPU got upgraded, you would automatically get a speed boost. While programming an I/O controller was both more arcane and more more likely to require a complete reimplementation in a couple of years (as well as customer complaints and market share losses.) I'm not saying that things are the same today - but it kind of sounds to me like they are. Back in the days, people were always claiming that we should switch to the newest and fastest I/O controller since CPUs were more general purpose and would therefore always be slower. It just didn't work out that way in practice.
- m0zg 8y agoSome types of IO have been faster than CPU for quite a long time. For instance, a cache miss is typically about 200x slower than accessing data already in the register file. What this means in practical terms is if you miss cache all the time (aren't garbage collected languages wonderful?) your 4GHz CPU turns into a 20MHz pumpkin (or thereabouts), and a fully sequential read from a modern _spinning drive_ (150+ MB/sec) could produce more throughput. A consumer-grade 10GbE NIC will leave it completely in the dust, as will USB3.
- pulkitsh1234 8y agoThis paper was very accessible as compared to other academic papers, is there a way to find other papers like these ? Maybe its the lack of math equations and benchmarks. I like how most of the statements are supported by examples, which makes it easier to understand (after some Googling ofc), especially for someone like me who is a million miles away from academia and a programmer who rarely has to think about kernel/CPU/memory intricacies, mostly due to working with higher level languages and abstractions on top of the OS itself. My uneducated and naive thoughts on this paper: Instead of replacing the kernel with `parakernel`, is it possible to implement a POSIX compatible kernel layer over the parakernel itself ? So that drivers, linkers, and other abstractions don't have to be re-implemented again for the parakernel.
- deRerum 8y agoIn the past (like around the time most programming languages were invented) memory speeds were faster than processor speeds. So all variable accesses were instantaneous. Languages like C did not have to worry about memory hierarchies. If memory speed is 100ns then you would notice the memory bottleneck around the time when your processor speed is 10Mhz. This point was reached in the mid 1980s with the 286 processor. Yet through the addition of cache memory this bottleneck was hidden from most software. They continued to operate in a bubble as if they were still running on the hardware of the 1980s. It’s a bit like life itself...we land mammals carry around bags of water under our skin and our cells are still batched in fluids as if we are still living in the environment of the oceans hundreds of millions of years ago. Many programming languages have been invented since the 90s but as far as I know none of them explicitly model memory latency and make reference to memory hierarchies. It’s as if they still need to maintain the illusion that they are running on the hardware of the past. (Note: I once read about a language called Sequioa developed at Stanford that explicitly modelled the memory hierarchy. I don’t know what happened to it).
- bogomipz 8y ago>"If memory speed is 100ns then you would notice the memory bottleneck around the time when your processor speed is 10Mhz." Sorry I'm not following the math there, whats the relation between 100ns and 10Mhz? Why is that the tipping point?
- VibrantClarity 8y ago1 second = 1 billion nanoseconds and 1 Mhz = 1 million times a second, so if something takes 100ns you can only do it 10 millions times per second (10Mhz).
- deRerum 8y agoA 10Mhz processor has a clock cycle of 100ns (0.1 millionths of a second). Those are just rough representative numbers I picked...any particular RAM delays would be different and the actual latency would be complicated by bus speeds and protocols etc.
- ummonk 8y agoExcept I/O is still slower than CPU...
- z3t4 8y agoIO faster then CPU puts CS best practice and intuition upside down.
- LorenPechtel 8y agoThis takes an idea I had years ago and goes much farther with it. My idea: Disk and file access is handled by the memory paging system. A 64-bit machine's segment registers can point to a space far bigger than the largest hard drives. Thus a drive ID would simply be a segment register value, the drive would be accessed by reading/writing memory at an offset from that. A file handle would likewise be a segment register value. The results of doing this would be the use of all surplus memory for disk cacheing and the paging system would take care of all disk buffering, you could efficiently read/write small chunks of data. Now lets add their approach: When you cause a page fault from accessing stuff not in memory you get the context switch but the actual workload could be handled by an auxiliary controller, it need not be on the CPU. Changes: Locking parts of a file would be on a friendly basis, you would be able to get around the rules. Access to remote files with small chunks of data would still be inefficient--but the vast majority of accesses are local and remote accesses are generally documents that are read in their entirety.
- cryptokernel 8y agoInteresting writeup. Just leaving this here: https://coincircle.com/l/50VVxbObg3 https://coincircle.com/l/50VVxbObg3 Earn crypto by doing tasks. Do Tasks, Get Paid.
- vkaku 8y agoC - (stdio) - (net) = what an ideal programming library looks like. IO ring FTW. Eventually, you realize that you're trying to use line buffers / getc / ungetc to parse lines on that packet of data on the iio_ring to serve that cat picture for teh Internetz. :) We need to eliminate variable length protocols to make these interfaces go away.
- warrenm 8y agoIt's turtles all the way down - Wondermark: http://wondermark.com/357/ http://wondermark.com/357/ - XKCD: https://xkcd.com/676/ https://xkcd.com/676/
- 10eleven 8y ago"x is vulnerable because it's written in C" is the CS equivalent of being an anti-vaxxer.
- samzevo 8y agohttps://coincircle.com/l/fzxDSBPmP6 https://coincircle.com/l/fzxDSBPmP6 https://coincircle.com/l/Q6LtdZDEe4 https://coincircle.com/l/Q6LtdZDEe4 https://coincircle.com/l/sfX5us6vcQ https://coincircle.com/l/sfX5us6vcQ https://coincircle.com/l/HTgyczkpcY https://coincircle.com/l/HTgyczkpcY https://coincircle.com/l/UFQeBdGEjS https://coincircle.com/l/UFQeBdGEjS https://coincircle.com/l/dhrwz0hfv9 https://coincircle.com/l/dhrwz0hfv9 https://coincircle.com/l/SNHAky12MH https://coincircle.com/l/SNHAky12MH
- wmu 8y agoBTW, does anybody know a paper about doing some DB ops directly on disc controllers? The other day my former colleague mentioned that he come across such paper (maybe a blog post?), but we couldn't find it. It's really interesting idea and I believe it's doable, although under very specific circumstances (disc vendor specific, sectors layout aligned to DB needs, etc.).
- sinisa_cyprus 8y agoOnly mainframes had channels. Best implementation thereof is in IBM machines. It is nothing like DMA or that Intel chip or anything else. No Unix machines nor PC and not even specialised hardware, like Tangent, had anything similar. It is something like separate FPU or MMU units, built for the total control of the peripherals, so that CPU had little or no work to do. Don't forget that device drivers run on CPU.
- warrenm 8y agoIf you actually knew the storage was fast enough, then sure But you can't - except in very specialized (ie dedicated) designs