473,473 Members | 2,036 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Thead Performance

Dan
All,

I have an application that transfers files from one
machine to another machine (in a remote location) via FTP.
My question is in regards to the performance of the FTP
transfer. Am I better to run a single thread and transfer
one file at a time to the remote machine or am I better to
have a few threads running each transfering a file to that
machine? I have not been able to find any data regarding
such a situation. Any insight would be much appreciated.
Thanks!
Nov 15 '05 #1
4 1312
Dan,

This depends on a number of factors. First, what is the connection of
the FTP server? Can it accept as much data at the same time as you want to
throw at it (in other words, what is the connection speed on the other end).
Also, what is the connection speed of the machine you are sending the files
from? If you try and send out 100 files at the same time, each connection
might transfer very slowly because your pipe going out isn't that wide.

Also, when it comes to performing processing on another thread, you
generally should take advantage of the ThreadPool class, which will allow
you to queue requests and then have them executed when there are enough
resources. The reason for this is that the ThreadPool would manage the
number of threads based on the number of processors and current system
resources.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Dan" <dd*****@fnisolutions.com> wrote in message
news:00****************************@phx.gbl...
All,

I have an application that transfers files from one
machine to another machine (in a remote location) via FTP.
My question is in regards to the performance of the FTP
transfer. Am I better to run a single thread and transfer
one file at a time to the remote machine or am I better to
have a few threads running each transfering a file to that
machine? I have not been able to find any data regarding
such a situation. Any insight would be much appreciated.
Thanks!

Nov 15 '05 #2
You probably want to take advantage of the asynchronous I/O capabilities
built into the CLR/Framework.

There's a great async I/O sample in the original framework documentation.

http://msdn.microsoft.com/library/de...ketexample.asp
http://msdn.microsoft.com/library/de...ketexample.asp

what's nice is that it uses the threadpool and leverages IO completeion
ports so things happen as fast as they can.

eAndy

p.s. reply to group, email is bogus.
"Dan" <dd*****@fnisolutions.com> wrote in message
news:00****************************@phx.gbl...
All,

I have an application that transfers files from one
machine to another machine (in a remote location) via FTP.
My question is in regards to the performance of the FTP
transfer. Am I better to run a single thread and transfer
one file at a time to the remote machine or am I better to
have a few threads running each transfering a file to that
machine? I have not been able to find any data regarding
such a situation. Any insight would be much appreciated.
Thanks!

Nov 15 '05 #3
Just try it and see. You can think about this for weeks and not come up
with a satisfactory answer. Take an hour to try it, and you will know right
away.

"Dan" <dd*****@fnisolutions.com> wrote in message
news:00****************************@phx.gbl...
All,

I have an application that transfers files from one
machine to another machine (in a remote location) via FTP.
My question is in regards to the performance of the FTP
transfer. Am I better to run a single thread and transfer
one file at a time to the remote machine or am I better to
have a few threads running each transfering a file to that
machine? I have not been able to find any data regarding
such a situation. Any insight would be much appreciated.
Thanks!

Nov 15 '05 #4
theading does not overcome the transfer rate over the wire. it only allows
you to do several more transfers at the same time. How many threads needed,
hard to tell, but the more is not necessarily the merrier due to context
switching. press me, i say 5 threads, each with its quota of files blasting
across the network would be a good start, then tune it, time it, vary the
threads and the load per thread to see what works optimally.

"Jason Smith" <ja***@nospam.com> wrote in message
news:uV**************@TK2MSFTNGP10.phx.gbl...
Just try it and see. You can think about this for weeks and not come up
with a satisfactory answer. Take an hour to try it, and you will know right away.

"Dan" <dd*****@fnisolutions.com> wrote in message
news:00****************************@phx.gbl...
All,

I have an application that transfers files from one
machine to another machine (in a remote location) via FTP.
My question is in regards to the performance of the FTP
transfer. Am I better to run a single thread and transfer
one file at a time to the remote machine or am I better to
have a few threads running each transfering a file to that
machine? I have not been able to find any data regarding
such a situation. Any insight would be much appreciated.
Thanks!


Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: serge | last post by:
I have an SP that is big, huge, 700-800 lines. I am not an expert but I need to figure out every possible way that I can improve the performance speed of this SP. In the next couple of weeks I...
11
by: Woolly Mittens | last post by:
I tried validating my gallery page using your validator. http://validator.w3.org/check?uri=http%3A%2F%2Fwww.woollymittens.nl%2Fcontent%2Fgallery%2Findex.asp To my surprise it informed me that...
6
by: teedilo | last post by:
We have an application with a SQL Server 2000 back end that is fairly database intensive -- lots of fairly frequent queries, inserts, updates -- the gamut. The application does not make use of...
13
by: bjarne | last post by:
Willy Denoyette wrote; > ... it > was not the intention of StrousTrup to the achieve the level of efficiency > of C when he invented C++, ... Ahmmm. It was my aim to match the performance...
1
by: David L | last post by:
Is anyone aware of a method to get the datagrid control to spit out <thead> and <th> tags for headers? I really want to avoid some pre-render hack manipulating strings in the output stream. ...
1
by: toffee | last post by:
Hi all, say i have a table with 2 rowspan - what would be the js syntax to return the thead height and width ? many thanks T
1
by: jvn | last post by:
I am experiencing a particular problem with performance counters. I have created a set of classes, that uses System.Diagnostics.PerformanceCounter to increment custom performance counters (using...
0
by: redaudi | last post by:
I'm hoping someone might be able to help me with the following issue. Basically I'm creating a htmltable on the fly and then simply populating it with rows and cells accordingly. My test site ...
0
by: makifsar | last post by:
I am using a comserver to communicate remote equipments. This server gives response via WndProc. First I call READ function to start communication and remote equipment gives response this via...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
Oralloy
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,...
0
jinu1996
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...
0
tracyyun
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...
0
agi2029
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.