473,508 Members | 2,303 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to take the advantage of a high end box with 4 cpus running win2k3 server with C# programming

Hi,
I'm programming an application with .net C#. The application will talk to
SQL Server on same box. The box has 4 P4 CPUs running Win2k3 server. I have
a question here, what kind of technique I should use to take the most
advantage of the box besides multi-threading?

Thanks in advance!
Mark
Nov 16 '05 #1
6 1208
I presume it must be a windows application and not an ASP.Net app.

with regards,
J.V.Ravichandran
- http://www.geocities.com/
jvravichandran
- http://www.411asp.net/func/search?
qry=Ravichandran+J.V.&cob=aspnetpro
- http://www.southasianoutlook.com
- http://www.MSDNAA.Net
- http://www.csharphelp.com
- http://www.poetry.com/Publications/
display.asp?ID=P3966388&BN=999&PN=2
- Or, just search on "J.V.Ravichandran"
at http://www.Google.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #2
Hi,

What the application does ?

Multi thread is good for lenghtly processing, especially when you have more
than one processor, if the application is a web app for example you don't
have to spawn new threads as multiples request should execute concurrently
on different processors.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Mark" <mx*@rogers.com> wrote in message
news:pf********************@rogers.com...
Hi,
I'm programming an application with .net C#. The application will talk to
SQL Server on same box. The box has 4 P4 CPUs running Win2k3 server. I
have
a question here, what kind of technique I should use to take the most
advantage of the box besides multi-threading?

Thanks in advance!
Mark

Nov 16 '05 #3
Hi,
It's a windows application and will query data multiple times from SQL
Server, does some calculation and update the table with the results.
I did some test for that with threading. I initialed 30 threads and started
them. Only some were executed and others looked like never started. What did
it happen? I missed something?

Thanks,
Mark
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:eU**************@TK2MSFTNGP09.phx.gbl...
Hi,

What the application does ?

Multi thread is good for lenghtly processing, especially when you have more than one processor, if the application is a web app for example you don't
have to spawn new threads as multiples request should execute concurrently
on different processors.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Mark" <mx*@rogers.com> wrote in message
news:pf********************@rogers.com...
Hi,
I'm programming an application with .net C#. The application will talk to SQL Server on same box. The box has 4 P4 CPUs running Win2k3 server. I
have
a question here, what kind of technique I should use to take the most
advantage of the box besides multi-threading?

Thanks in advance!
Mark


Nov 16 '05 #4
Yes, it's a windows app.

"Ravichandran J.V." <jv************@yahoo.com> wrote in message
news:#J**************@TK2MSFTNGP14.phx.gbl...
I presume it must be a windows application and not an ASP.Net app.

with regards,
J.V.Ravichandran
- http://www.geocities.com/
jvravichandran
- http://www.411asp.net/func/search?
qry=Ravichandran+J.V.&cob=aspnetpro
- http://www.southasianoutlook.com
- http://www.MSDNAA.Net
- http://www.csharphelp.com
- http://www.poetry.com/Publications/
display.asp?ID=P3966388&BN=999&PN=2
- Or, just search on "J.V.Ravichandran"
at http://www.Google.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #5
Mark <mx*@rogers.com> wrote:
It's a windows application and will query data multiple times from SQL
Server, does some calculation and update the table with the results.
I did some test for that with threading. I initialed 30 threads and started
them. Only some were executed and others looked like never started. What did
it happen? I missed something?


Without seeing your code, it's impossible to tell. The connection pool
may be throttling the number of concurrent connections to your server
though. Also if you're updating your UI from the worker threads, that
would cause problems.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #6
Jon,
Probably too many classes and lines to post them. But you reminded me.
Originally my single thread program use one sql connect pool with default
its properties which has 100 connections inside. All jobs done by one
object, the object at least talks to SQL Server 5 times. Then I changed the
program by manually start 30 worker threads and each thread runs with one
object (each object has different target to avoid dead lock issue). Then the
worst case, some threads cannot get the sql connection. The UI is only
updated by main thread.

I will increase the connection number in the sql connection pool and try
again.

Thanks,
Mark
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Mark <mx*@rogers.com> wrote:
It's a windows application and will query data multiple times from SQL
Server, does some calculation and update the table with the results.
I did some test for that with threading. I initialed 30 threads and started them. Only some were executed and others looked like never started. What did it happen? I missed something?


Without seeing your code, it's impossible to tell. The connection pool
may be throttling the number of concurrent connections to your server
though. Also if you're updating your UI from the worker threads, that
would cause problems.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


Nov 16 '05 #7

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

Similar topics

9
1375
by: int | last post by:
Is .NET 2.0 Framework going to take advantage of 64-bit computing? Intel and especially AMD's Opteron are 64-bit and they are really inexpensive. Look at the prices here......
1
1512
by: | last post by:
I have an application that runs on mod_python/apache using the publisher handler. It uses an access db as the backend and connects via ADO. In a test environment on XP it runs fine, but when on a...
7
1875
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using vs2005, .net2.0 for a windows application. I call a C++ compile dll and it works fine in Win2K server but I get the follow error message when I run the same application on a win2k3...
2
3059
by: mcfly1204 | last post by:
Our network consists of two Win2k Server DC's, with several other Win2k3 servers. I cannot find where I can configure terminal services access within the GPO for the user in question. In Win2k3...
0
7225
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
7123
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...
0
7324
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
7382
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
7495
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
3193
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3181
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.