Re: Tcl 8.4 can kill Windows XP
From: David Gravereaux (davygrvy_at_pobox.com)
Date: 03/16/05
- Next message: Gerald W. Lester: "Re: Starpack and extension"
- Previous message: Jeff Smith: "Re: non blocking FTP"
- In reply to: Roy Terry: "Re: Tcl 8.4 can kill Windows XP"
- Next in thread: Bruce Hartweg: "Re: Tcl 8.4 can kill Windows XP"
- Reply: Bruce Hartweg: "Re: Tcl 8.4 can kill Windows XP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 15 Mar 2005 18:55:18 -0800
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Roy Terry wrote:
> "David Gravereaux" <davygrvy@pobox.com> wrote in message
> news:l6qdncSZveNax6rfRVn-pA@speakeasy.net...
>
> Roy Terry wrote:
>
>>"David Gravereaux" <davygrvy@pobox.com> wrote in message
>>news:_ZqdnXkAu_N3marfRVn-pg@speakeasy.net...
>
>>Roy Terry wrote:
>
>
>>>"Thomas Schnurrenberger" <tsbg@swissonline.ch> wrote in message
>>>news:d0qgho$hnd$1@news.hispeed.ch...
>
>
>>>>Roy Terry wrote:
>
>
>>>>>Can anyone suggest a good and quick tool to
>>>>>log i/o calls from the wish/tclsh process into the OS?
>>>>>
>>>>>I have procexp.exe from sysinternals.com but that
>>>>>doesn't trace calls.
>>>>>
>>>>>Thanks,
>>>>>roy
>>>>>
>
>>>>Have you tried the Filemon utility from Sysinternals?
>
>>>Good. Yes that shows Tcl just doing the
>>>obvious create/write/close as near as I can tell.
>
>>I can smell that one coming.. and it smells like a windows OS bug.
>
>>I did the same amount of tracing for a winsock bug once and finally
>>determined it was the notification mechanism of WSAAsyncSelect getting
>>overrun. But that was for FD_ACCEPTs getting lost by winsock coming in,
>>your's appears to be file creates getting lost writing to disk.
>
>>We could try rewriting the file channel driver for overlapped mode ;)
>>How does the notification work in the file channel driver? I've never
>>looked at it.
>
>
>>>I don't know if file events play into this as the only events
>>>I'm using are "after" events.
Whoops. somehow thought [fileevent] could do notifications.. It
doesn't really make sense, does it? You can't wait on a file becoming
readable in the same way you do for a socket? I guess there isn't
really a mirror for 'tail' on windows is there?
In concept, should there be a way to tell.. Guess you read all the way
to EOF, close and wait for more FindNextChangeNotification(s) to fire
then pick-up from the last file pointer spot, repeat. That would do it,
I think. But then you aren't waiting on the handle, you'd be waiting on
the file itself which doesn't fit the Tcl innards model all that well.
> But I'm with you that it's probably
>>>something in the OS. After 300 files/sec for about 1hr 30 minutes
>>>the OS hangs! - Still investigating.
>>>Roy
>
> I'll have a look and try to rough a replacement in overlapped mode.
>
>> Would that approach be a win in efficiency and throughput?
- From what I can gather from the docs, more context switching is required
for many/short files and the benefit is for large/few files. But.. we
are already using buffered I/O provided by the generic layer, so there's
probably not much of a benefit moving from synchronous to asynchronous
ReadFile/WriteFile except that writes can go really fast. In
synchronous, it only syncs to the fact that the file system consumed the
buffer, not that the data was written to disk. It'd make a big
difference if we were to write a gig of data in one call to WriteFile,
but we don't; the generic layer chops it up as per -buffersize.
>> UPDATE: installed XP Pro SP1a on unused disk and booted
>> that version. Ran the stress test (300 files/sec, 5000/500 bytes sizes and
>> it was still running fine after 4.5 hours, 4,560,000 files. Hmm. Now
>> re-running
>> on SP2 and assuming it will hang as usual. If so I'll be loading all MS
>> updates/patches
>> and re-try. Right now it looks like they put their foot in it on SP2.
I just looked at trying overlapped and it isn't going to be that easy
for me. It isn't going to be quick as it'll require different code for
NT and 9x systems and I'll have to track the file pointer manually. The
9x code will require a thread pool due to the 64 handle limit for
WaitForMultipleEvents, but the NT code can just use a single thread
managing the IO completion port..
Dang.. So close to what I want to do for that IOCPSOCK thing when I
place it in the core. I'd better just do that first ;)
- --
David Gravereaux <davygrvy@pobox.com>
[species:human; planet:earth,milkyway(western spiral arm),alpha sector]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
iD8DBQFCN6AUlZadkQh/RmERAhTXAJ4x1hQZKlH1W0VNJE59NJieWualkgCg9Bhz
OUHXCHgPwhhORFpDdPah6lE=
=lXol
-----END PGP SIGNATURE-----
- Next message: Gerald W. Lester: "Re: Starpack and extension"
- Previous message: Jeff Smith: "Re: non blocking FTP"
- In reply to: Roy Terry: "Re: Tcl 8.4 can kill Windows XP"
- Next in thread: Bruce Hartweg: "Re: Tcl 8.4 can kill Windows XP"
- Reply: Bruce Hartweg: "Re: Tcl 8.4 can kill Windows XP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|