* [PATCH] nss_files: Tune down tst-nss-files-hosts-getent resource usage
@ 2023-06-07 13:44 Adhemerval Zanella
2023-08-02 16:31 ` Adhemerval Zanella Netto
0 siblings, 1 reply; 2+ messages in thread
From: Adhemerval Zanella @ 2023-06-07 13:44 UTC (permalink / raw)
To: libc-alpha
The tests creates about 4860 subprocesses, which might stress the
system and generate a false-negative due timeout depending of the
system load. For instance, on Ryzen 5900X on 5.19.0-43-generic
without any system load
$ time (nss/tst-nss-files-hosts-getent --direct)
real 0m1,501s
user 0m1,226s
sys 0m0,275s
However, if system does have some load:
$ stress-ng -c $(nproc) -i 1 -m 1 --vm-bytes 128M -t 120s &
$ time (nss/tst-nss-files-hosts-getent --direct)
real 1m6,592s
user 0m2,515s
sys 0m0,389s
The buffers size coverage also stresses similar code paths, so
lower the maximum buffer size checked.
Checked on x86_64-linux-gnu.
---
nss/tst-nss-files-hosts-getent.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/nss/tst-nss-files-hosts-getent.c b/nss/tst-nss-files-hosts-getent.c
index e52b845bb7..556347c373 100644
--- a/nss/tst-nss-files-hosts-getent.c
+++ b/nss/tst-nss-files-hosts-getent.c
@@ -251,8 +251,8 @@ do_test (void)
FAIL_EXIT1 ("could not load " LIBNSS_DNS_SO ": %s", dlerror ());
/* Each name takes about 20 bytes, so this covers a wide range of
- buffer sizes, from less than 1000 bytes to about 18000 bytes. */
- for (name_count = 40; name_count <= 850; ++name_count)
+ buffer sizes, from less than 1000 bytes to about 5000 bytes. */
+ for (name_count = 40; name_count <= 250; ++name_count)
{
write_hosts ();
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] nss_files: Tune down tst-nss-files-hosts-getent resource usage
2023-06-07 13:44 [PATCH] nss_files: Tune down tst-nss-files-hosts-getent resource usage Adhemerval Zanella
@ 2023-08-02 16:31 ` Adhemerval Zanella Netto
0 siblings, 0 replies; 2+ messages in thread
From: Adhemerval Zanella Netto @ 2023-08-02 16:31 UTC (permalink / raw)
To: libc-alpha
Ping.
On 07/06/23 10:44, Adhemerval Zanella wrote:
> The tests creates about 4860 subprocesses, which might stress the
> system and generate a false-negative due timeout depending of the
> system load. For instance, on Ryzen 5900X on 5.19.0-43-generic
> without any system load
>
> $ time (nss/tst-nss-files-hosts-getent --direct)
>
> real 0m1,501s
> user 0m1,226s
> sys 0m0,275s
>
> However, if system does have some load:
>
> $ stress-ng -c $(nproc) -i 1 -m 1 --vm-bytes 128M -t 120s &
> $ time (nss/tst-nss-files-hosts-getent --direct)
>
> real 1m6,592s
> user 0m2,515s
> sys 0m0,389s
>
> The buffers size coverage also stresses similar code paths, so
> lower the maximum buffer size checked.
>
> Checked on x86_64-linux-gnu.
> ---
> nss/tst-nss-files-hosts-getent.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/nss/tst-nss-files-hosts-getent.c b/nss/tst-nss-files-hosts-getent.c
> index e52b845bb7..556347c373 100644
> --- a/nss/tst-nss-files-hosts-getent.c
> +++ b/nss/tst-nss-files-hosts-getent.c
> @@ -251,8 +251,8 @@ do_test (void)
> FAIL_EXIT1 ("could not load " LIBNSS_DNS_SO ": %s", dlerror ());
>
> /* Each name takes about 20 bytes, so this covers a wide range of
> - buffer sizes, from less than 1000 bytes to about 18000 bytes. */
> - for (name_count = 40; name_count <= 850; ++name_count)
> + buffer sizes, from less than 1000 bytes to about 5000 bytes. */
> + for (name_count = 40; name_count <= 250; ++name_count)
> {
> write_hosts ();
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-02 16:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-07 13:44 [PATCH] nss_files: Tune down tst-nss-files-hosts-getent resource usage Adhemerval Zanella
2023-08-02 16:31 ` Adhemerval Zanella Netto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).