[Haskell-cafe] File I/O benchmark help (conduit, io-streams and Handle)

Michael Snoyman michael at snoyman.com
Fri Mar 8 11:32:29 CET 2013


That demonstrated the issue: I'd forgotten to pass O_TRUNC to the open
system call. Adding that back makes the numbers much more comparable.

Thanks for the input everyone, and Gregory for finding the actual problem
(as well as pointing out a few other improvements).


On Fri, Mar 8, 2013 at 12:13 PM, Gregory Collins <greg at gregorycollins.net>wrote:

> Something must be wrong with the conduit "NoHandle" code. I increased the
> filesize to 60MB and implemented the copy loop in pure C, the code and
> results are here:
>
> https://gist.github.com/gregorycollins/5115491
>
> Everything but the conduit NoHandle code runs in roughly 600-620ms,
> including the pure C version.
>
> G
>
>
> On Fri, Mar 8, 2013 at 10:13 AM, Alexander Kjeldaas <
> alexander.kjeldaas at gmail.com> wrote:
>
>>
>>
>>
>> On Fri, Mar 8, 2013 at 9:53 AM, Gregory Collins <greg at gregorycollins.net>wrote:
>>
>>> On Fri, Mar 8, 2013 at 9:48 AM, John Lato <jwlato at gmail.com> wrote:
>>>
>>>> For comparison, on my system I get
>>>> $ time cp input.dat output.dat
>>>>
>>>> real 0m0.004s
>>>> user 0m0.000s
>>>> sys 0m0.000s
>>>>
>>>
>>> Does your workstation have an SSD? Michael's using a spinning disk.
>>>
>>>
>> If you're only copying a GB or so, it should only be memory traffic.
>>
>> Alexander
>>
>>
>>>
>>> --
>>> Gregory Collins <greg at gregorycollins.net>
>>>
>>> _______________________________________________
>>> Haskell-Cafe mailing list
>>> Haskell-Cafe at haskell.org
>>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>>
>>>
>>
>
>
> --
> Gregory Collins <greg at gregorycollins.net>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130308/bf8fb1b1/attachment.htm>


More information about the Haskell-Cafe mailing list