darcs

Issue 631 darcs add of file larger than memory results in "out of memory" error

Title darcs add of file larger than memory results in "out of memory" error
Priority not-our-bug Status wont-fix
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, thorkilnaur, tommy, zooko
Assigned To
Topics

Created on 2008-01-31.16:15:49 by zooko, last changed 2009-08-27.13:53:52 by admin.

Messages
msg2980 (view) Author: zooko Date: 2008-01-31.16:15:43
I created a 1 billion byte file (the machine has a mere 500 million  
bytes of physical RAM), darcs added that file, and then darcs  
recorded and I got

darcs failed: out of memory

This was with darcs-2.

Regards,

Zooko
msg2988 (view) Author: droundy Date: 2008-01-31.16:42:16
I'm sorry Zooko, but I'm going to have to declare that using darcs with files
that don't fit into memory+swap is just a mistake, not our bug.  Perhaps we
should document this, but the changes needed to allow us to deal with files of
this magnitude are just silly.

David
msg2992 (view) Author: zooko Date: 2008-01-31.17:20:43
On Jan 31, 2008, at 9:42 AM, David Roundy wrote:

> I'm sorry Zooko, but I'm going to have to declare that using darcs  
> with files
> that don't fit into memory+swap is just a mistake, not our bug.   
> Perhaps we
> should document this, but the changes needed to allow us to deal  
> with files of
> this magnitude are just silly.

I think that you are saying two things here:  first, that people  
shouldn't want that, and second that it would be hard to implement.

On the first point, I'm sure that rarely someone will want it, but  
not often.

On the second point, I'll have to take your word for it, but I  
continue to be surprised that when working in a programming language  
that was designed from the start for laziness and abstraction, that  
it isn't easy to make an abstraction over data which lazily uses the  
disk only when necessary.  (What about an abstraction which can be  
implemented just by using mmap?)

I don't think it is necessary to document this, as long as the error  
messages are clear when it happens, which was it was for the "darcs  
add bigfile && darcs record" test that I did.

Regards,

Zooko
msg2998 (view) Author: daveroundy Date: 2008-01-31.18:46:23
...
> On the second point, I'll have to take your word for it, but I
> continue to be surprised that when working in a programming language
> that was designed from the start for laziness and abstraction, that
> it isn't easy to make an abstraction over data which lazily uses the
> disk only when necessary.  (What about an abstraction which can be
> implemented just by using mmap?)

In order to use files of this magnitude,  we wouldn't need just lazy
reading or lazy processing of data, we'd need active swapping to disk.
 Laziness would allow a few operations (e.g. get and record and maybe
pull, if there's no merging needed), but we'd need real swapping in
order to avoid failure in nontrivial darcs commands.  Which is why it
doesn't seem worthwhile to implement this.  It's not that you can't
work with files of this size, you just need to use more swap, since we
aren't going to reimplement that functionality of the OS ourselves
(even though in principle we could do a better job with darcs-specific
swap functionality).

David
History
Date User Action Args
2008-01-31 16:15:49zookocreate
2008-01-31 16:39:54markstoslinkissue632 superseder
2008-01-31 16:42:17droundysetpriority: not-our-bug
status: unread -> resolved
messages: + msg2988
nosy: droundy, tommy, beschmi, kowey, zooko
2008-01-31 17:20:44zookosetstatus: resolved -> unknown
nosy: droundy, tommy, beschmi, kowey, zooko
messages: + msg2992
2008-01-31 18:46:24daveroundysetnosy: + daveroundy
messages: + msg2998
2008-01-31 19:57:14droundysetstatus: unknown -> resolved
nosy: droundy, tommy, beschmi, kowey, zooko, daveroundy
2008-01-31 19:57:23droundysetstatus: resolved -> wont-fix
nosy: droundy, tommy, beschmi, kowey, zooko, daveroundy
2008-09-28 20:49:49adminsetnosy: + dagit, simon, thorkilnaur, - daveroundy
2009-08-06 17:52:51adminsetnosy: + markstos, jast, Serware, dmitry.kurochkin, darcs-devel, mornfall, - droundy
2009-08-06 20:56:04adminsetnosy: - beschmi
2009-08-10 22:12:40adminsetnosy: - markstos, darcs-devel, jast, Serware, mornfall
2009-08-11 00:05:45adminsetnosy: - dagit
2009-08-25 17:29:17adminsetnosy: + darcs-devel, - simon
2009-08-27 13:53:52adminsetnosy: tommy, kowey, darcs-devel, zooko, thorkilnaur, dmitry.kurochkin