lwip运行ram_RAM很便宜,所以我们为什么不从中运行所有内容?

lwip运行ram

lwip运行ram

RAM modules are cheaper than ever before, so why aren’t we running our entire operating system off super speedy RAM banks?

RAM模块比以往任何时候都便宜,那么为什么我们不使用超高速RAM组运行整个操作系统呢?

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

今天的“问答”环节由SuperUser提供,它是Stack Exchange的一个分支,该社区是由社区驱动的Q&A网站分组。

问题 (The Question)

SuperUser reader pkr298 wants to know why we’re not running RAM-based, instead of disk-based, machines. He writes:

超级用户阅读器pkr298想知道为什么我们不运行基于RAM的计算机,而不是基于磁盘的计算机。 他写:

RAM is cheap, and much faster than SSDs. It’s just volatile. So why don’t computers have a LOT of RAM, and on power up, load everything to the RAM from the hard drive/SSD and just run everything from there, assuming there’s no real need to persist anything outside of memory? Wouldn’t computers be much faster?

RAM很便宜,并且比SSD快得多。 它只是易变的。 那么,为什么计算机没有大量的RAM,并在开机时将所有内容从硬盘驱动器/ SSD加载到RAM并仅从那里运行所有内容,前提是没有真正需要将任何东西持久化到内存之外? 电脑会不会快得多?

Of course, current operating system may not support this at all, but is there any reason RAM isn’t used this way?

当然,当前的操作系统可能根本不支持此功能,但是是否有任何理由不使用RAM?

On the surface his inquiry makes sense, but clearly we’re not awash in RAM-based computer builds; what’s the back story?

从表面上看,他的询问是有道理的,但显然我们不会被基于RAM的计算机所充斥。 背后的故事是什么?

答案 (The Answer)

SuperUser contributor Hennes offers some insight into why we still use disk-based systems:

超级用户贡献者Hennes提供了一些为什么我们仍然使用基于磁盘的系统的见解:

There are a few reasons RAM is not used that way:

不使用RAM的原因有几个:

  1. Common desktop (DDR3) RAM is cheap, but not quite that cheap. Especially if you want to buy relatively large DIMMs.

    普通台式机(DDR3)RAM很便宜,但并不便宜。 特别是如果您要购买相对较大的DIMM。
  2. RAM loses its contents when powered off. Thus you would need to reload the content at boot time. Say you use a SSD sized RAMDISK of 100GB, that means about two minutes delay while 100GB are copied from the disk.

    关闭电源后,RAM会丢失其内容。 因此,您将需要在引导时重新加载内容。 假设您使用大小为100GB的SSD大小的RAMDISK,这意味着从磁盘复制100GB时大约要延迟两分钟。
  3. RAM uses more power (say 2–3 Watt per DIMM, about the same as an idle SSD).

    RAM使用更多的功率(例如,每个DIMM 2-3瓦,大约与空闲的SSD相同)。
  4. To use so much RAM, your motherboard will need a lot of DIMM sockets and the traces to them. Usually this is limited to six or less. (More board space means more costs, thus higher prices.)

    要使用这么多的RAM,您的主板将需要很多DIMM插槽以及它们的走线。 通常限制为六个或更少。 (更多的电路板空间意味着更多的成本,因此价格也更高。)
  5. Lastly, you will also need RAM to run your programs in, so you will need the normal RAM size to work in (e.g. 18GiB, and enough to store the data you expect to use).

    最后,您还需要运行程序的RAM,因此您需要正常的RAM大小(例如18GiB,足以存储您希望使用的数据)。

Having said that: Yes, RAM disks do exist. Even as PCI board with DIMM sockets and as appliances for very high IOps. (Mostly used in corporate databases before SSD’s became an option). These things are not cheap though. Here are two examples of low end RAM disk cards which made it into production:

话虽如此:是的,RAM磁盘确实存在。 甚至用作具有DIMM插槽的PCI板,以及用作具有很高IOps的设备。 (通常在公司数据库中使用,然后成为SSD的选择)。 这些东西并不便宜 。 以下是两个将其投入生产的低端RAM磁盘卡的示例:

Note that there are way more ways of doing this than just by creating a RAM disk in the common work memory.

请注意,除了在公共工作存储器中创建RAM磁盘外 ,还有更多的方法可以做到这一点。

You can:

您可以:

  1. Use a dedicated physical drive for it with volatile (dynamic) memory. Either as an appliance, or with a SAS, SATA or PCI[e] interface.

    为它使用易失性(动态)内存的专用物理驱动器。 既可以作为设备,也可以具有SAS,SATA或PCI [e]接口。
  2. You can do the same with battery backed storage (no need to copy initial data into it since it will keep its contents as long as the backup power stays valid).

    您可以对电池供电的存储执行相同的操作(无需将初始数据复制到其中,因为只要备用电源保持有效,它就会保留其内容)。
  3. You can use static RAMs rather then DRAMS (simpler, more expensive).

    您可以使用静态RAM,而不是DRAM(更简单,更昂贵)。
  4. You can use flash or other permanent storage to keep all the data (Warning: flash usually has a limited number of write cycles). If you use flash as only storage then you just moved to SSDs. If you store everything in dynamic RAM and save to flash backup on power down then you went back to appliances.

    您可以使用闪存或其他永久性存储来保留所有数据(警告:闪存通常具有有限数量的写周期)。 如果仅将闪存用作存储设备,则仅移至SSD。 如果将所有内容存储在动态RAM中,并在断电时保存到闪存备份中,那么您将返回到设备。

I am sure there is way more to describe, from Amiga RAD: reset surviving RAM disks to IOPS, wear leveling and G-d knows what, However I will cut this short and only list one more item:

我敢肯定,还有从Amiga RAD可以描述的更多方法:将尚存的RAM磁盘重置为IOPS,耗损均衡和Gd知道什么,但是我将简短介绍一下,仅列出另外一项:

DDR3 (current DRAM) prices versus SSD prices:

DDR3(当前DRAM)价格与SSD价格:

  • DDR3: € 10 per GiB, or € 10,000 per TiB

    DDR3:每GiB 10欧元,或每TiB 10,000欧元
  • SSDs: Significantly less. (About 1/4th to 1/10th.)

    SSD:少得多。 (大约1/4至1/10。)

If you want to read more about RAM disks, check out RAM Disks Explained: What They Are and Why You Probably Shouldn’t Use One.

如果您想了解有关RAM磁盘的更多信息,请查看《 RAM磁盘说明:它们是什么以及为什么您不应该使用其中一个》



Have something to add to the explanation? Sound off in the the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

有什么补充说明吗? 在评论中听起来不对。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 在此处查看完整的讨论线程

翻译自: https://www.howtogeek.com/171500/ram-is-cheap-so-why-dont-we-run-everything-from-it/

lwip运行ram

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值