On 19 October 2012 03:29, ольга крыжановская
<olga.kryzhanov...@gmail.com> wrote:
> Glenn, David, Suse 12.2, with ast-ksh.20121016 command substitutions
> still use read() to read data instead of mmap(), as you can see with
> this tests:
> strace ~/bin/ksh -c 'x=$(seq 400000) ; true' 2>&1 | fgrep 'read(' | wc -l
> 50
> strace ~/bin/ksh -c 'x=$(seq 800000) ; true' 2>&1 | fgrep 'read(' | wc -l
> 92
> strace ~/bin/ksh -c 'x=$(seq 1600000) ; true' 2>&1 | fgrep 'read(' | wc -l
> 187
>
> The builtin cat command does not use mmap() either, as you can see in
> this tests:
> strace ~/bin/ksh -c 'builtin cat ; builtin rm ; seq 1600000 >s1 ; cat
> s1 >s2 ; rm s1 s2' 2>&1 | fgrep 'read(' | wc -l
> 187
> strace ~/bin/ksh -c 'builtin cat ; builtin rm ; seq 3200000 >s1 ; cat
> s1 >s2 ; rm s1 s2' 2>&1 | fgrep 'read(' | wc -l
> 382
> strace ~/bin/ksh -c 'builtin cat ; builtin rm ; seq 6400000 >s1 ; cat
> s1 >s2 ; rm s1 s2' 2>&1 | fgrep 'read(' | wc -l
> 773
>
> On Solaris, the Sun /usr/bin/cat uses mmap(), and for this reason, out
> runs AST cat, even the libcmd built in version, by a factor of 1.9-2.7
> for files larger than 10MB.

David, Glenn, can you try to fix this for the next alpha, please? It
seems this has a larger performance impact for large datasets on busy
systems (i.e. "big data) and send the patch for ast-ksh 2012-10-16 to
me (and anyone else interested, too)

Ced
-- 
Cedric Blancher <cedric.blanc...@googlemail.com>
Institute Pasteur
_______________________________________________
ast-developers mailing list
ast-developers@research.att.com
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to