jGuru: Java Native Interface (JNI) FAQ:: one is keep the dll in winnt/system32 dir use System.loadLibrary a twain in vc++ to get access to scanner devices and i want to send this to java http://www.jguru.com/faq/printablefaq.jsp?topic=JNIHOME | Hi,
I have a tcp client program running on WinNT and Win2k. The same program has a big performance difference in both OS. I found the difference is in select() and send(). Both OS are running on PIII + 64MB RAM. The test is implemented in VB v6 SP5, and invokes a DLL implemented by VC++ v6. The DLL will create 2 connection, initialize socket and send out a message. The 2 connection will be done one after another.
The perfomance in WinNT takes 5 seconds for first select()/send(), and <1s for second select()/send(). Sometimes, the first select()/send() will take 13 seconds!
The one in Win2K takes 2-3 seconds for both connections.
If we add the RAM to 256MB, the WinNT will complete in 2-3s.
Why there is a big difference in the performance? Something swapped out? Or the underlying tcp system is different in NT and 2K?
Please advice. I don't know what we can improve, other than adding more memory.
Thanks in advance.
I believe that, at least in the earlier versions implemented on Windows NT that resolution when thru all the MS specific lookups (and waited until they timed out) before it tried hitting the DNS servers... e.g. cache, netbios, host files, then dns...
That would explain the initial delay in response time... and then after the first pass, the cache would be hit instead of all the other network queries... McAfee – Computer Anti-Virus Software and Internet Security For Your PC:: Automatic execution and infection only occurs on Win2K/XP. Indications of Infection nai.com , the path is set to /pub/security/tsc20/updates/winnt/ and that the http://us.mcafee.com/virusInfo/default.asp?id=lovsanHOME |
While I am not 100% certain... I would suspect that Win 2k has either reversed the order or has some additional rules which can change ordering... e.g. if the name to resolve is not a valid netbios name or similar occurence then there is no reason to try to look it up that way...
Unfortunately, I am not familiar enough with that aspect of Win NT operations to be able to say what, if anything which can be done to modify the default behaviour... but would suspect that somewhere, there must be a place to change it!
Michael
maybe registry tuning.
But, anyway, i use workstation nt 4 and tcp performance is very poor. Default recv/send size is 8 kb and i have > 192 MB RAM.
Is problem lost nt4 and put w2k? some network function under win are cached, this mean, second execution is always faster. gethostbyname() too.
Finally, I have located the problem, but still don't understand why.
The difference is not select()/send(), but gethostbyname().
In WinNT, for first call to gethostbyname(), it takes around 15 seconds. For subsequent call, it is faster.
In Win2K, both calls take <1s.
Would anybody shed some light on this issue? Or any proper network setup or host table setup should be done in WinNT, in order to improve the host table search.
Thanks in advance.
How much does getting a small tattoo on your hip/stomach hurt?
Do anyone else have an itchy anus? ?
|