English 中文(简体)
鲁比叉子是否友好,
原标题:Are Ruby fork are COW friendly if yes how to test it

I have read some where that ruby fork are COW friendly ok here the link

但当我碰巧四处寻找更多关于它的信息时,我发现Ruby不支持“强型”COW

现在我实际上有点困惑了 红宝石是否实际支持了 < 强 > COW 功能

I m also aware that REE and Rubinius has a COW friendly GC so does that me REE and Rubinius support COW functionality

如果红宝石支持 < 强 > COW < /强 > 功能, 那么如何在Ruby 测试“ 强” 概念的标本 < /强 > 代码

谢谢 谢谢

最佳回答

fork being copy-on-write 是操作系统内核的属性, 不是 Ruby。 在大多数类似 UNIX 的系统中, 是 。

例如,在 Linux 上, 您可以查看 < code>/ proc/ pid/ smaps , 并查看共享多少堆积映射。 下面是使用叉子的 < code> bash 的示例 :

02020000-023cd000 rw-p 00000000 00:00 0                                  [heap]
Size:               3764 kB
Rss:                3716 kB
Pss:                1282 kB
Shared_Clean:          0 kB
Shared_Dirty:       3652 kB
Private_Clean:         0 kB
Private_Dirty:        64 kB
Referenced:          144 kB
Anonymous:          3716 kB
AnonHugePages:         0 kB
Swap:                  0 kB
KernelPageSize:        4 kB
MMUPageSize:           4 kB
Locked:                0 kB

因此,在3764公里的堆积堆中,共有3652kk。关于/proc 中文件的文件,见proc.txt

当然,Ruby可能有些东西 导致COW页面被复制(例如,也许它的垃圾收集器 写在每页上), 但你可以看到,通过共享的数数到0, 可以看到这一点。

问题回答

暂无回答




相关问题
Ruby parser in Java

The project I m doing is written in Java and parsers source code files. (Java src up to now). Now I d like to enable parsing Ruby code as well. Therefore I am looking for a parser in Java that parses ...

rails collection_select vs. select

collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

multiple ruby extension modules under one directory

Can sources for discrete ruby extension modules live in the same directory, controlled by the same extconf.rb script? Background: I ve a project with two extension modules, foo.so and bar.so which ...

Text Editor for Ruby-on-Rails

guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...