Hi,
I'm working on a little deployment app to support .Net file deployments to
about 7 different locations on the network. It's somewhat intelligent in
that it only deploys changed files, and moves the old files to a backup
folder, so that most deployments can be done w/o booting all users off. The
network is pretty slow, so I built it so that each deployment (defined as
unique source/target folder combination) runs in a separate thread.
The issue I'm running into is that FileVersionInfo.GetVersionInfo seems to
either be running in a single thread below the surface, or have some other
issue with multithreading that I don't understand. Each call is at least
twice as long and, at regular intervals, the CPU utilization hits 100% and
stays there for 15-20 secs, with more than 50% Kernel Time, whatever that
might imply. The end result is that the app runs just as slow as in a single
thread, except it's even more annoying to watch.
The only obvious point of contention is that the threads may access the same
file in a source folder, but they are all local or on a fast connection, so
I can't see how it would hang it for that long.
Does anyone know what the issue is and how I can fix it? Would a separate
AppDomain help? Process?
Thanks,
Magnus 10 3754
Hi there,
I think you might be missing 1 main point,
* Only 1 part of the hard drive can be accessed at any given time by the
drive heads.
I think the only case that this would be different is if you were to
have a RAID setup.
Nick.
--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."
Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Hi Magsnus,
I was thinking about it, and there where some things in my head.
But first a little question.
Is the throughput time from 7 simultaneous connections longer or is the sum
from the total processor time higher (That would be normal)?
Cor
I think Nak has this hit firmly on the head. Unless the network speed is
slower than the disk access/read/write speed, then that's the answer.
OHM
"Nak" <a@a.com> wrote in message
news:Os**************@TK2MSFTNGP10.phx.gbl... Hi there,
I think you might be missing 1 main point,
* Only 1 part of the hard drive can be accessed at any given time by
the drive heads.
I think the only case that this would be different is if you were to have a RAID setup.
Nick.
--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ "No matter. Whatever the outcome, you are changed."
Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Hi,
Thanks for you thoughts on this.
The network speed is significantly slower than the disk speed. Loading the
version info is subsecond on a local machine, and the files are typically
smaller than 100k. Running against a single remote machine, it runs in about
3-5 seconds. Running 7 at the time, they start hitting 20-90 seconds. The
only culprits I can see at this point are;
1. The GetVersionInfo method was not designed to run in multiple threads
(in the same process), e.g. by using a single instance of the file system
and/or by using sync locks to handle concurrent calls.
2. The appdomain and/or process is running some part in a single thread,
e.g. by pooling disk resources through a single pipe to the os.
3. The antivirus software may force the entire files to be loaded,
sequentially, before the info can be read from them.
/Magnus
"One Handed Man [ OHM ]" <te***************************@BTOpenworld.com>
wrote in message news:O2**************@TK2MSFTNGP10.phx.gbl... I think Nak has this hit firmly on the head. Unless the network speed is slower than the disk access/read/write speed, then that's the answer.
OHM
"Nak" <a@a.com> wrote in message news:Os**************@TK2MSFTNGP10.phx.gbl... Hi there,
I think you might be missing 1 main point,
* Only 1 part of the hard drive can be accessed at any given time by the drive heads.
I think the only case that this would be different is if you were to have a RAID setup.
Nick.
--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ "No matter. Whatever the outcome, you are changed."
Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Hi,
The total runtime seems to be about the same, but I didn't time it exactly.
Note the times (from a different reply in the same thread):
"The network speed is significantly slower than the disk speed. Loading the
version info is subsecond on a local machine, and the files are typically
smaller than 100k. Running against a single remote machine, it runs in about
3-5 seconds. Running 7 at the time, they start hitting 20-90 seconds.
The only culprits I can see at this point are;
1. The GetVersionInfo method was not designed to run in multiple threads
(in the same process), e.g. by using a single instance of the file system
and/or by using sync locks to handle concurrent calls.
2. The appdomain and/or process is running some part in a single thread,
e.g. by pooling disk resources through a single pipe to the os.
3. The antivirus software may force the entire files to be loaded,
sequentially, before the info can be read from them."
Thanks,
Magnus
"Cor" <no*@non.com> wrote in message
news:3f***********************@reader22.wxs.nl... Hi Magsnus, I was thinking about it, and there where some things in my head. But first a little question. Is the throughput time from 7 simultaneous connections longer or is the
sum from the total processor time higher (That would be normal)? Cor
Hi,
BTW, just thought of it. GetVersionInfo is a shared method, which would
imply either instantiating io objects all over the place or running with
synclocks and a single set of io objects. The latter seems the most likely
from the behavior. Can I get around that by using a separate AppDomain, or
do I need a separate process?
Thanks,
Magnus
"Magnus" <ma*********@hotmail.com> wrote in message
news:e9**************@TK2MSFTNGP09.phx.gbl... Hi, The total runtime seems to be about the same, but I didn't time it
exactly. Note the times (from a different reply in the same thread):
"The network speed is significantly slower than the disk speed. Loading
the version info is subsecond on a local machine, and the files are typically smaller than 100k. Running against a single remote machine, it runs in
about 3-5 seconds. Running 7 at the time, they start hitting 20-90 seconds.
The only culprits I can see at this point are; 1. The GetVersionInfo method was not designed to run in multiple threads (in the same process), e.g. by using a single instance of the file system and/or by using sync locks to handle concurrent calls. 2. The appdomain and/or process is running some part in a single thread, e.g. by pooling disk resources through a single pipe to the os. 3. The antivirus software may force the entire files to be loaded, sequentially, before the info can be read from them."
Thanks, Magnus
"Cor" <no*@non.com> wrote in message news:3f***********************@reader22.wxs.nl... Hi Magsnus, I was thinking about it, and there where some things in my head. But first a little question. Is the throughput time from 7 simultaneous connections longer or is the sum from the total processor time higher (That would be normal)? Cor
Hi there Magnus, The network speed is significantly slower than the disk speed. Loading the version info is subsecond on a local machine, and the files are typically smaller than 100k. Running against a single remote machine, it runs in
about 3-5 seconds. Running 7 at the time, they start hitting 20-90 seconds. The only culprits I can see at this point are;
It seems like you are answering your question there, it runs ok on a
local machine but slow over the network? If you have a slow network how can
multithreading make it any faster? You're just going to be using more
bandwidth at once if your multithreading, and if your'e network can't take
the load then it's going to slow down.
1. The GetVersionInfo method was not designed to run in multiple threads (in the same process), e.g. by using a single instance of the file system and/or by using sync locks to handle concurrent calls.
I'm not sure if the .NET version info function is like in comparrison to the
Win32 API equivilent. Have you tried it?
3. The antivirus software may force the entire files to be loaded, sequentially, before the info can be read from them.
Have you tried disabling the anti-virus software to rule that out?
I think you will find it is either 1 of 2 things,
1. As mentioned previously your are overloading the hard drive.
2. You are overloading your network bandwidth. How is your network setup?
why is it so slow? Do you have 10 baseT network cards or something? Have
you got a *bad* router in the way?
Let's say that the function forces more information than is required to be
sent across the network, increasing the load beyond the capable threshold,
have you thought about attempting a quick web service that acquires the data
and sends only what is needed for you? Or some other host application?
Just ideas.
Nick.
--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."
Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ /Magnus
"One Handed Man [ OHM ]" <te***************************@BTOpenworld.com> wrote in message news:O2**************@TK2MSFTNGP10.phx.gbl... I think Nak has this hit firmly on the head. Unless the network speed is slower than the disk access/read/write speed, then that's the answer.
OHM
"Nak" <a@a.com> wrote in message news:Os**************@TK2MSFTNGP10.phx.gbl... Hi there,
I think you might be missing 1 main point,
* Only 1 part of the hard drive can be accessed at any given time
by the drive heads.
I think the only case that this would be different is if you were
to have a RAID setup.
Nick.
--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ "No matter. Whatever the outcome, you are changed."
Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Hi,
It seems to work fine running in a separate appdomain. The bottlenecks I'm
trying to get around are latency and slow VPN connections to the remote
locations. The local pipe is big enough to handle all requests at the same
time.
/Magnus
"Nak" <a@a.com> wrote in message
news:Ov**************@TK2MSFTNGP09.phx.gbl... Hi there Magnus,
The network speed is significantly slower than the disk speed. Loading
the version info is subsecond on a local machine, and the files are
typically smaller than 100k. Running against a single remote machine, it runs in about 3-5 seconds. Running 7 at the time, they start hitting 20-90 seconds.
The only culprits I can see at this point are;
It seems like you are answering your question there, it runs ok on a local machine but slow over the network? If you have a slow network how
can multithreading make it any faster? You're just going to be using more bandwidth at once if your multithreading, and if your'e network can't take the load then it's going to slow down.
1. The GetVersionInfo method was not designed to run in multiple threads (in the same process), e.g. by using a single instance of the file
system and/or by using sync locks to handle concurrent calls. I'm not sure if the .NET version info function is like in comparrison to
the Win32 API equivilent. Have you tried it?
3. The antivirus software may force the entire files to be loaded, sequentially, before the info can be read from them. Have you tried disabling the anti-virus software to rule that out?
I think you will find it is either 1 of 2 things,
1. As mentioned previously your are overloading the hard drive. 2. You are overloading your network bandwidth. How is your network setup? why is it so slow? Do you have 10 baseT network cards or something? Have you got a *bad* router in the way?
Let's say that the function forces more information than is required to be sent across the network, increasing the load beyond the capable threshold, have you thought about attempting a quick web service that acquires the
data and sends only what is needed for you? Or some other host application? Just ideas.
Nick.
--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ "No matter. Whatever the outcome, you are changed."
Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
/Magnus
"One Handed Man [ OHM ]" <te***************************@BTOpenworld.com> wrote in message news:O2**************@TK2MSFTNGP10.phx.gbl... I think Nak has this hit firmly on the head. Unless the network speed
is slower than the disk access/read/write speed, then that's the answer.
OHM
"Nak" <a@a.com> wrote in message news:Os**************@TK2MSFTNGP10.phx.gbl... > Hi there, > > I think you might be missing 1 main point, > > * Only 1 part of the hard drive can be accessed at any given
time by the > drive heads. > > I think the only case that this would be different is if you
were to > have a RAID setup. > > Nick. > > -- >
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ > "No matter. Whatever the outcome, you are changed." > > Fergus - September 5th 2003 >
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ > >
> It seems to work fine running in a separate appdomain. The bottlenecks I'm trying to get around are latency and slow VPN connections to the remote locations. The local pipe is big enough to handle all requests at the same time.
That leaves you being pretty much buggered doesn't it? Sorry to hear that,
surely there must be some way of speeding up your VPN connections and such
like? even if it means new / different hardware or software changes...?
Nick.
--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."
Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Hi Magnus,
I did some testing work.
I get the next figures.
Just relative figures absolute is not intresting of course.
request = fileninfo like you do on a netwerk sharedrive
1 thread with 600 requests 50x
2 threads with 300 requests 41x
6 threads with 100 request 36x
synclock had no influence at all.
So multithreading makes the throughput time shorter, there is maybe
something not right in your application I think.
I hope this helps a little bit.
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: SLE |
last post by:
Hi there,
I need the setter equivalent for
System.Diagnostics.FileVersionInfo.GetVersionInfo(). Has anybody implemented
a SetVersionInfo()? Some example code or url would be more than...
|
by: Woody |
last post by:
I have a page that is linked into by other pages that pass it query
strings, it then reads a config file, displays 1 of several forms, gets
posted to itself, depending upon users response may...
|
by: NolanB |
last post by:
I'm trying to use this class in a mult-threaded app (C#). I'm running on a
hyper-threaded CPU (so it looks like 2 x CPUs to the OS) and there is no
difference in timings when i run with 1 thread...
|
by: Jim |
last post by:
Hi. I would like to validate the version string that I
get from FileVersionInfo. Is there a way via the object
model to do this?
I am currently doing this:
FileVersionInfo fileVersionInfo =...
|
by: wdwedw |
last post by:
I have included all the source codes in the attached MyTest.zip
(http://www.codeguru.com/forum/attachment.php?attachmentid=11218)
There are three projects:
VBTestCOM project is a apartment...
|
by: 1944USA |
last post by:
I am re-architecting a C# application written as a multithreaded
Windows Service and trying to squeeze every bit of performance out of
it.
1) Does the thread that an object is instantiated on...
|
by: semedao |
last post by:
Hi ,
I am looking for the simple way to get the FileVersionInfo.GetVersionInfo
for outlook add in - for the host com
also I want to know how to get it in:
Console application and in...
|
by: Jay Loden |
last post by:
All,
In studying Python, I have predictably run across quite a bit of talk about the GIL and threading in Python. As my day job, I work with a (mostly Java) application that is heavily threaded....
|
by: Martin Zugec |
last post by:
Hello,
I am trying to detect OLESelfRegister in file version info (to detect
if library requires registration), but to my surprise
FileVersionInfo ignores this flag :(
Dim Info As...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |