Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <v3d7t4$2bugr$1@dont-email.me>
Deutsch   English   Français   Italiano  
<v3d7t4$2bugr$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Paul <nospam@needed.invalid>
Newsgroups: comp.lang.c
Subject: Re: xxd -i vs DIY Was: C23 thoughts and opinions
Date: Fri, 31 May 2024 15:20:02 -0400
Organization: A noiseless patient Spider
Lines: 71
Message-ID: <v3d7t4$2bugr$1@dont-email.me>
References: <v2l828$18v7f$1@dont-email.me>
 <00297443-2fee-48d4-81a0-9ff6ae6481e4@gmail.com>
 <v2lji1$1bbcp$1@dont-email.me> <87msoh5uh6.fsf@nosuchdomain.example.com>
 <f08d2c9f-5c2e-495d-b0bd-3f71bd301432@gmail.com>
 <v2nbp4$1o9h6$1@dont-email.me> <v2ng4n$1p3o2$1@dont-email.me>
 <87y18047jk.fsf@nosuchdomain.example.com>
 <87msoe1xxo.fsf@nosuchdomain.example.com> <v2sh19$2rle2$2@dont-email.me>
 <87ikz11osy.fsf@nosuchdomain.example.com> <v2v59g$3cr0f$1@dont-email.me>
 <20240528144118.00002012@yahoo.com> <v34odg$kh7a$1@dont-email.me>
 <20240528185624.00002494@yahoo.com> <v359f1$nknu$1@dont-email.me>
 <20240528232315.00006a58@yahoo.com> <v35kkl$pis1$1@dont-email.me>
 <20240529012456.000003ce@yahoo.com> <v38vv9$1huh8$1@dont-email.me>
 <20240530104009.00005a6f@yahoo.com> <v3af3p$1q0fu$1@dont-email.me>
 <20240530223140.00000567@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 31 May 2024 21:20:05 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="b32edb36b2332d5d755dcaea205f87b4";
	logging-data="2488859"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19M8PXZkBYq+n99JkadkC0aIIQxcWhhy24="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:ikMJkC7NtS0AuVsl1/BED6+fRzs=
Content-Language: en-US
In-Reply-To: <20240530223140.00000567@yahoo.com>
Bytes: 4505

On 5/30/2024 3:31 PM, Michael S wrote:
> On Thu, 30 May 2024 14:04:39 -0400
> Paul <nospam@needed.invalid> wrote:
> 
>>
>> WSL Ubuntu20.04 version 2
>>
> 
> Are you sure that you tested WSL, not WLS-2?
> Your results looks very much like WLS2.
> Your explanationns sound very much as if you are talking about WSL-2.
> 
> My WSL testing results are opposit from yours - read speed identical,
> write speed consitently faster when writing to /mnt/d/... then when
> writing to WSL's native FS.
> Part of the reason could be that SSD D: is physically faster than SSD
> C: that hosts WSL. I should have tested with /mnt/c as well, but
> forgot to do it.
> 

I can't test WSL, because it won't start. It throws an error.

I used what I had.

I am specifically trying to test on the
box with the NVMe in it (to eliminate slower devices from the
picture). I only own one NVMe and one slot to load it.

*******

As for your general problem, you can easily malloc a buffer
for the entire file, and process the table as stored in RAM.
That should help eliminate your variable file system overhead
when benching.

That's not scalable for general usage, but during benchmarking
and fast prototyping stage, you might test with it. That way,
moving the executable around, the filesystem component is removed.
Or, the filesystem component can be timestamped if you want.
I just send timestamps to stderr so they won't interfere with stdout.

*******

I just had a thought. If I use "df" in WSL2, the slash almost
looks like it is on a TMPFS (Ram). That could be why I got 2GB/sec.
Check in wsl environment, and using "df", check for evidence of
how the file systems were set up there.

$ df
Filesystem      1K-blocks      Used Available Use% Mounted on
none             32904160       960  32903200   1% /run
none             32904160         0  32904160   0% /run/lock
none             32904160         0  32904160   0% /run/shm
tmpfs            32904160         0  32904160   0% /sys/fs/cgroup
....
C:\             124493820  60595608  63898212  49% /mnt/c

$ top

top - 15:15:45 up 5 min,  1 user,  load average: 0.00, 0.00, 0.00
Tasks:  45 total,   1 running,  44 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :  64265.9 total,  63170.6 free,    631.5 used,    463.8 buff/cache
MiB Swap:  16384.0 total,  16384.0 free,      0.0 used.  63035.9 avail Mem

Like a LiveDVD, the TMPFS is using up to a half of available RAM.
It behaves the same way when you boot a LiveDVD.

Your WSL instance, could have quite a different look to the mounts in "df".

   Paul