Kh?c ph?c: SetMinThreads v GetMinThreads API thm vo l?p h?c th?i gian ch?y ThreadPool ngn ng? ph? bi?n

D?ch tiu ? D?ch tiu ?
ID c?a bi: 810259 - Xem s?n ph?m m bi ny p d?ng vo.
Bung t?t c? | Thu g?n t?t c?

TRI?U CH?NG

B?n khng th? c?u h?nh s? ch? ? c?a cng nhn, t?i thi?u ho?c I/O ch? ? trong cc ThreadPool l?p h?c.

GI?I PHP

M?t s?a ch?a ?c h? tr? l by gi? c s?n t? Microsoft, nhng n ch? l nh?m kh?c ph?c s? c? l m t? trong bi vi?t ny. N ch? p d?ng cho my vi tnh ang g?p v?n ? ny c? th?. S?a ch?a c th? nh?n ?c th? nghi?m b? sung. V? v?y, n?u b?n khng b? ?nh h?ng b?i v?n ? ny, Microsoft khuy?n co r?ng b?n ch? cho t?i.Gi d?ch v? NET Framework c ch?a ny S?a ch?a.

? gi?i quy?t v?n ? ny ngay l?p t?c, h?y lin h? v?i s?n ph?m c?a Microsoft H? tr? d?ch v? ? c ?c s?a ch?a. ?i v?i danh sch ?y ? cc s?n ph?m c?a Microsoft H? tr? d?ch v? i?n tho?i v thng tin v? chi ph h? tr?, h?y truy c?p cc Microsoft Web site sau:
http://support.microsoft.com/contactus/?ws=support
LU ?: Trong tr?ng h?p ?c bi?t, chi ph m th?ng ph?i gnh ch?u cho h? tr? cc cu?c g?i c th? ?c h?y b? n?u chuyn vin h? tr? Microsoft xc ?nh r?ng m?t C?p Nh?t c? th? s? gi?i quy?t v?n ? c?a b?n. Cc chi ph i?n h?nh h? tr? s? p d?ng ? h? tr? thm cu h?i v v?n ? ny khng ? i?u ki?n cho C?p Nh?t c? th? trong cu h?i.

Phin b?n ti?ng Anh c?a S?a ch?a c thu?c tnh t?p (ho?c sau ny) m ?c li?t k theo sau y b?ng. Ngy thng v th?i gian cho nh?ng t?p tin ?c li?t k trong ph?i h?p universal th?i gian (UTC). Khi b?n xem chi tiet tap tin, n ?c chuy?n ?i thnh gi? c?c b?. ? bi?t s? khc nhau gi?a UTC v local time, s? d?ng cc Mi gi? th? cng c? ngy v gi? trong Pa-nen i?u khi?n.
   Date	        Time   Version       Size       File name
   --------------------------------------------------------------
   08-Nov-2002  17:34  1.0.3705.374    196,608  Aspnet_isapi.dll
   08-Nov-2002  17:26                    4,169  Aspnet_perf.h
   08-Nov-2002  17:26                   20,468  Aspnet_perf.ini
   08-Nov-2002  17:26                   20,342  Aspnet_perf2.ini
   08-Nov-2002  17:34  1.0.3705.374     24,576  Aspnet_regiis.exe
   08-Nov-2002  17:34  1.0.3705.374     28,672  Aspnet_wp.exe
   08-Nov-2002  16:52  1.0.3705.374     69,632  Corperfmonext.dll
   10-Nov-2002  14:56  1.0.3705.374  1,953,792  Mscorlib.dll
   31-Oct-2002  18:04                   10,252  Mscorlib.ldo
   08-Nov-2002  16:51  1.0.3705.374  2,269,184  Mscorsvr.dll
   08-Nov-2002  16:51  1.0.3705.374  2,269,184  Mscorwks.dll
   22-Aug-2002  19:23                       15  Smartnav.htm
   22-Oct-2002  13:41                    8,728  Smartnav.js
   20-Mar-2002  13:31                    7,003  Smartnavie5.js
   10-Nov-2002  14:59  1.0.3705.374  1,187,840  System.web.dll
				

T?NH TR?NG

Microsoft ? xc nh?n r?ng y l m?t v?n ? trong cc s?n ph?m c?a Microsoft ?c li?t k ?u bi vi?t ny.

THNG TIN THM

Ch?c nng ? ?c thm vo th?i gian ch?y ngn ng? ph? bi?n ThreadPool l?p cho php b?n ? c?u h?nh s? cng nhn, t?i thi?u ch? ? v ch? ? c?a I/O trong qu t?i.

Microsoft khuy?n co r?ng b?n i?u ch?nh s? t?i thi?u c?a ch? ? ch? khi khng t?i trn cc my ch? Web ?i v?i ch? ng?n th?i gian (0-10 pht). Trong nh?ng tr?ng h?p ny, cc ThreadPool khng c ? th?i gian ? ?t ?c m?c t?i u c?a ch? ? ? x? l? t?i.

N?u s? t?i thi?u c?a ch? ? c?a cng nhn ho?c I/O ch? ? ?c c?u h?nh, cc ThreadPool ngay l?p t?c t?o ch? ? m?i ?n s? t?i thi?u quy ?nh (m?c ?nh l 0) trong m?t th?i gian t?i cao. Sau khi khng ho?t ?ng, cc ch? ? c?a ch?t.

Hai API sau y ? ?c thm vo cc ThreadPool l?p:
  • Phng php ThreadPool.SetMinThreads
    ?t s? l?ng cng nhn threads v t?i thi?u t?i thi?u s? i/o: khng ?ng b? ch? ? cho cc ThreadPool.
    public static bool SetMinThreads(int workerThreads, int completionPortThreads);
    Tham s?
    workerThreads: S? l?ng cc ch? ? c?a cng nhn.
    completionPortThreads: S? l?ng cc ch? ? khng ?ng b? c?a I/O.
  • Phng php ThreadPool.GetMinThreads
    ?c s? l?ng cng nhn threads v t?i thi?u t?i thi?u s? i/o: khng ?ng b? ch? ? cho cc ThreadPool.
    public static void GetMinThreads(out int workerThreads, out int completionPortThreads);
    Tham s?
    workerThreads: S? l?ng cc ch? ? c?a cng nhn.
    completionPortThreads: S? l?ng cc ch? ? khng ?ng b? c?a I/O.
? bi?t thm thng tin v? cc ThreadPool l?p, gh thm Web site sau c?a Microsoft:
ThreadPool l?p
http://msdn2.Microsoft.com/en-US/Library/System.Threading.threadpool (vs.71) .aspx
Hai ci ?t c?u h?nh m?i ? ?c thm vo cc <processmodel>c?u h?nh ph?n trong Machine.config ? s? d?ng m?i <b00></b00></processmodel>ThreadPool l?p ch?c nng t? ASP.NET:
  • minWorkerThreads: C?u h?nh s? t?i thi?u c?a cng nhn ch? ? ?c s? d?ng cho qu tr?nh trn m?t c s? cho m?i CPU. V d?, n?u gi tr? ny l 10 ngy m?t ?a n b? vi x? l? my ch?, ASP.NET s? d?ng th?i gian ch?y API ? thi?t l?p gi?i h?n quy tr?nh 10. Trn m?t my ch? hai b? vi x? l?, gi?i h?n ?c ?t-20. M?c ?nh l 0.
  • minIoThreads: C?u h?nh t?i thi?u s? khng ?ng b? I/O ch? ? ?c ?c s? d?ng cho qu tr?nh trn m?t c s? cho m?i CPU. V d?, n?u gi tr? ny l 10 ngy m?t ?a n b? vi x? l? my ch?, ASP.NET s? d?ng th?i gian ch?y API ? thi?t l?p gi?i h?n quy tr?nh 10. Trn m?t my ch? hai b? vi x? l?, gi?i h?n ?c ?t-20. M?c ?nh l 0.

Thu?c tnh

ID c?a bi: 810259 - L?n xem xt sau cng: 28 Thang Tam 2011 - Xem xt l?i: 2.0
p d?ng
  • Microsoft .NET Framework 1.1
  • Microsoft ASP.NET 1.0
T? kha:
kbhotfixserver kbqfe kbfix kbbug kbmt KB810259 KbMtvi
My d?ch
QUAN TRONG: Bi vi?t ny ?c d?ch b?ng ph?n m?m d?ch my c?a Microsoft ch? khng ph?i do con ng?i d?ch. Microsoft cung c?p cc bi vi?t do con ng?i d?ch v c? cc bi vi?t do my d?ch ? b?n c th? truy c?p vo t?t c? cc bi vi?t trong C s? Ki?n th?c c?a chng ti b?ng ngn ng? c?a b?n. Tuy nhin, bi vi?t do my d?ch khng ph?i lc no c?ng hon h?o. Lo?i bi vi?t ny c th? ch?a cc sai st v? t? v?ng, c php ho?c ng? php, gi?ng nh m?t ng?i n?c ngoi c th? m?c sai st khi ni ngn ng? c?a b?n. Microsoft khng ch?u trch nhi?m v? b?t k? s? thi?u chnh xc, sai st ho?c thi?t h?i no do vi?c d?ch sai n?i dung ho?c do ho?t ?ng s? d?ng c?a khch hng gy ra. Microsoft c?ng th?ng xuyn c?p nh?t ph?n m?m d?ch my ny.
Nh?p chu?t vo y ? xem b?n ti?ng Anh c?a bi vi?t ny:810259

Cung cp Phan hi

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com