[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Degraded performance in cat + patch
From: |
Pádraig Brady |
Subject: |
Re: Degraded performance in cat + patch |
Date: |
Fri, 6 Mar 2009 11:35:11 +0000 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071008) |
Pádraig Brady wrote:
> Jim Meyering wrote:
>> >From 6dd9c564a0cba6eec95102f091c6692a5ab48876 Mon Sep 17 00:00:00 2001
>> From: Jim Meyering <address@hidden>
>> Date: Fri, 6 Mar 2009 10:27:43 +0100
>> Subject: [PATCH] cat: use larger buffer sizes to reduce read/write-syscall
>> overhead
>>
>> * src/cat.c (max): Remove definition. Use MAX from system.h instead.
>> (compute_buffer_size): New function.
>> (main): Use it, to compute larger input and output buffer sizes
>> derived from st_blksize, now typically 32KiB rather than 4KiB.
>> Suggestion from Tzvi Rotshtein.
>
> That sounds like previously cat did not derive from st_blksize
> and that st_blksize is typically 32KiB :) Suggested log message:
>
> * src/cat.c (max): Remove definition. Use MAX from system.h instead.
> (compute_buffer_size): New function to compute the input and output
> buffer sizes, which are now set at 8 times st_blksize with
> a minimum of 32KiB. Previously the typical block sizes used were
> 1KiB for pipes and 4KiB for files.
> (main): Use it.
> This was seem to increase throughput by up to 50%.
> Suggestion from Tzvi Rotshtein.
Oops :) accurate one below I think:
* src/cat.c (max): Remove definition. Use MAX from system.h instead.
(compute_buffer_size): New function to compute the input and output
buffer sizes, which are now set at 8 times st_blksize with a maximum
of 32KiB. Previously the typical block sizes used were 1KiB for pipes
and 4KiB for files, and now will be 8KiB and 32KiB respectively.
(main): Use it.
This was seem to increase throughput by up to 50%.
Suggestion from Tzvi Rotshtein.
- Degraded performance in cat + patch, Tzvi Rotshtein, 2009/03/06
- Re: Degraded performance in cat + patch, Pádraig Brady, 2009/03/06
- Re: Degraded performance in cat + patch, Jim Meyering, 2009/03/06
- Re: Degraded performance in cat + patch, Pádraig Brady, 2009/03/06
- Re: Degraded performance in cat + patch,
Pádraig Brady <=
- Re: Degraded performance in cat + patch, Pádraig Brady, 2009/03/06
- Re: Degraded performance in cat + patch, Jim Meyering, 2009/03/06
- Re: Degraded performance in cat + patch, Pádraig Brady, 2009/03/06
- Re: Degraded performance in cat + patch, Jim Meyering, 2009/03/06
- Re: Degraded performance in cat + patch, Pádraig Brady, 2009/03/06
- Re: Degraded performance in cat + patch, Jim Meyering, 2009/03/07
- Re: Degraded performance in cat + patch, Pádraig Brady, 2009/03/11
- Re: Degraded performance in cat + patch, Jim Meyering, 2009/03/11
- Re: Degraded performance in cat + patch, Pádraig Brady, 2009/03/11
- Re: Degraded performance in cat + patch, Jim Meyering, 2009/03/11