有没有办法加载大于内存的文件? [英] Is there a way of loading files larger than memory?

查看:105
本文介绍了有没有办法加载大于内存的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我尝试加载9Gb文件时遇到OutOfMemory异常。

I’m getting an OutOfMemory exception when I try to load a 9Gb file.

推荐答案

我肯定会分裂并征服路线。 
大多数服务器根本无法加载9GB文件。 
这就是说大多数人都不需要。  如果你的数据集是9GB,你应该可以对它进行分区,或者至少可以对它进行分区。 
流媒体是最复杂的技术,但是一旦掌握了它就很容易,但它可能不适用于DSC。 
虽然会进行分区。  请记住,为了将9GB加载到内存中,您的服务器将需要大量内存,您可能需要更改.NET CLR设置以调整OOM发生的默认值。 

I would definitely go the divide and conquer route.  Most servers simply will not be able to load a 9GB file.  That said most don’t need to.  If you’re data set is 9GB you should probably be able to partition it or at the very least stream it.  Streaming is the most sophisticated technique, but pretty easy once you get the hang of it, it may not work with DSC that well though.  Partitioning will though.  Keep in mind that in order to load 9GB into memory your server is going to need a whole lot of memory and you may need to change .NET CLR settings to adjust the default at which OOM occurs. 

亲切的问候,

- 丹


这篇关于有没有办法加载大于内存的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆