GNU bug report logs -
#73721
grep perf docs barely mention mem usage
Previous Next
Reported by: <mark.yagnatinsky <at> barclays.com>
Date: Wed, 9 Oct 2024 17:03:02 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #19 received at 73721-done <at> debbugs.gnu.org (full text, mbox):
Okay, that's a surprise. I had assumed the buffer would be mapped read-only.
If indeed it needs to modify the buffer then even the memory gains start to look marginal.
Thanks for explaining where my assumptions were wrong, and thanks also for confirming the parts that were right. I now know that the use-case I have in mind is likely better served by sed and not by grep.
-----Original Message-----
From: Paul Eggert <eggert <at> cs.ucla.edu>
Sent: Thursday, October 10, 2024 12:11 AM
To: Yagnatinsky, Mark : IT (NYK) <mark.yagnatinsky <at> barclays.com>
Cc: 73721-done <at> debbugs.gnu.org
Subject: Re: bug#73721: grep perf docs barely mention mem usage
CAUTION: This email originated from outside our organization - eggert <at> cs.ucla.edu Do not click on links, open attachments, or respond unless you recognize the sender and can validate the content is safe.
______________________________________________________________________
On 2024-10-09 14:12, mark.yagnatinsky <at> barclays.com wrote:
> With mmap(), the kernel just needs to set up a bit of book-keeping
Yes, I'm sure than in some cases mmap would be a win. However, all in all it was found not to be, and I expect that the hassle of maintaining the mmap variant wasn't worth whatever benefits it provided. As I recall 'grep' wants to modify its input buffers for other efficiency reasons, and mmap CoW likely won't be a performance win over page-aligned read.
We could be proved wrong by someone taking the time to resurrect --mmap and doing performance measurements of realistic benchmarks. I don't have the time for that, myself.
This message is for information purposes only. It is not a recommendation, advice, offer or solicitation to buy or sell a product or service, nor an official confirmation of any transaction. It is directed at persons who are professionals and is intended for the recipient(s) only. It is not directed at retail customers. This message is subject to the terms at: https://www.ib.barclays/disclosures/web-and-email-disclaimer.html.
For important disclosures, please see: https://www.ib.barclays/disclosures/sales-and-trading-disclaimer.html regarding marketing commentary from Barclays Sales and/or Trading desks, who are active market participants; https://www.ib.barclays/disclosures/barclays-global-markets-disclosures.html regarding our standard terms for Barclays Investment Bank where we trade with you in principal-to-principal wholesale markets transactions; and in respect to Barclays Research, including disclosures relating to specific issuers, see: https://publicresearch.barclays.com.
__________________________________________________________________________________
If you are incorporated or operating in Australia, read these important disclosures: https://www.ib.barclays/disclosures/important-disclosures-asia-pacific.html.
__________________________________________________________________________________
For more details about how we use personal information, see our privacy notice: https://www.ib.barclays/disclosures/personal-information-use.html.
__________________________________________________________________________________
This bug report was last modified 278 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.