Exetools  

Go Back   Exetools > General > x64 OS

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 09-09-2009, 17:33
jump jump is offline
VIP
 
Join Date: Jan 2009
Posts: 305
Rept. Given: 84
Rept. Rcvd 51 Times in 26 Posts
Thanks Given: 22
Thanks Rcvd at 41 Times in 27 Posts
jump Reputation: 51
Vista x64 , Windows 7 limits?

Hello,

i need to know what are internal limitations number of threads and processes running under x64 Vista and x64 Windows 7. Does anybody know it? I tried google but didnt find right paper about it. Also some other OS will be interesting: WinXP 32&64bit, Windows Server 2008 32&64, Linux 32&64.

Thanks

--
Jump
Reply With Quote
  #2  
Old 09-09-2009, 18:33
Git's Avatar
Git Git is offline
Old Git
 
Join Date: Mar 2002
Location: Torino
Posts: 1,115
Rept. Given: 220
Rept. Rcvd 265 Times in 157 Posts
Thanks Given: 108
Thanks Rcvd at 216 Times in 124 Posts
Git Reputation: 200-299 Git Reputation: 200-299 Git Reputation: 200-299
I am not certain, but I believe there is no set limit, it is only limited by the amount of available memory. What IS limited is the number of CPU's. There is no limit on the number of cores per chip, but there is a liit of 2 physical CPU chips.

Git
Reply With Quote
  #3  
Old 09-09-2009, 18:55
jump jump is offline
VIP
 
Join Date: Jan 2009
Posts: 305
Rept. Given: 84
Rept. Rcvd 51 Times in 26 Posts
Thanks Given: 22
Thanks Rcvd at 41 Times in 27 Posts
jump Reputation: 51
I think there must be some limit, because i wrote one app which use threads and if i go over ~4000 threads it crash, if lower it work.

--
Jump
Reply With Quote
  #4  
Old 09-09-2009, 19:34
Git's Avatar
Git Git is offline
Old Git
 
Join Date: Mar 2002
Location: Torino
Posts: 1,115
Rept. Given: 220
Rept. Rcvd 265 Times in 157 Posts
Thanks Given: 108
Thanks Rcvd at 216 Times in 124 Posts
Git Reputation: 200-299 Git Reputation: 200-299 Git Reputation: 200-299
Until you analyse the reason for the crash, you cannot draw any conclusions. I think running out of memory due to stack usuage or faults in the task scheduling is more likely. Have a read here :

http://blogs.msdn.com/oldnewthing/archive/2005/07/29/444912.aspx

So the achievable number of threads should be much higher in X64 with lots of memory, or if you make the default stack usage lower. Linus is a different matter, x32 Linux is limited to about 500 threads.

Git
Reply With Quote
  #5  
Old 09-09-2009, 19:40
Evilcry Evilcry is offline
Friend
 
Join Date: Jan 2009
Posts: 58
Rept. Given: 4
Rept. Rcvd 15 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 41 Times in 18 Posts
Evilcry Reputation: 15
Hi,

Limit exists also in x64 (we are talking about in a finite field) and we have to enstablish a difference between theorical limit and practical limit,
for a detailed explaination refer to this blog post:

http://blogs.technet.com/markrussinovich/archive/2009/07/08/3261309.aspx

remember to apply to your system Testlimit

Regards,
Evilcry
Reply With Quote
  #6  
Old 09-10-2009, 02:14
Git's Avatar
Git Git is offline
Old Git
 
Join Date: Mar 2002
Location: Torino
Posts: 1,115
Rept. Given: 220
Rept. Rcvd 265 Times in 157 Posts
Thanks Given: 108
Thanks Rcvd at 216 Times in 124 Posts
Git Reputation: 200-299 Git Reputation: 200-299 Git Reputation: 200-299
> we have to enstablish a difference between theorical limit and practical limit

Agreed, but more than that, we should also consider what jump first proposed, i.e., OS imposed limits. It is my view that :

OS Imposed Limit = none, infinite

theoretical limit = (total available memory)/((stack usage per thread) + (memory usage per thread))

practical limit <= theoretical limit as your app does not run in isolation or in a perfect environment.

It is in distinct contrast to CUDA and AMD's equivelent where there is a hardware imposed limit but the docs encourage you to run several million threads if possible to give their scheduler the best chance of doing it's job!.

Git
Reply With Quote
  #7  
Old 09-11-2009, 13:56
Evilcry Evilcry is offline
Friend
 
Join Date: Jan 2009
Posts: 58
Rept. Given: 4
Rept. Rcvd 15 Times in 9 Posts
Thanks Given: 2
Thanks Rcvd at 41 Times in 18 Posts
Evilcry Reputation: 15
Yeah with this categorization I agree with you!

the difference can be seen in this

Quote:
Like 32-bit threads, 64-bit threads also have a default of 1MB reserved for stack, but 64-bit processes have a much larger user-mode address space (8TB), so address space shouldnĄŻt be an issue when it comes to creating large numbers of threads. Resident available memory is obviously still a potential limiter, though. The 64-bit version of Testlimit (Testlimit64.exe) was able to create around 6,600 threads with and without the ¨Cn switch on the 256MB 64-bit Windows XP system, the same number that the 32-bit version created, because it also hit the resident available memory limit. However, on a system with 2GB of RAM, Testlimit64 was able to create only 55,000 threads, far below the number it should have been able to if resident available memory was the limiter (2GB/24K = 89,000):
In the case of 'jump' emerges that the problem is a possible Deadlock and he should test and profile is code.

For Deadlock can be used Multi-Threading: Deadlock Tracer Utility
downloadable here

http://www.codeproject.com/KB/threads/MultiThreading_Dead_Lock.aspx

Regards,
Evilcry
Reply With Quote
  #8  
Old 02-24-2010, 06:01
_Sigma
 
Posts: n/a
Perhaps a stack dump might help? With that many threads, deadlocks, data races, etc are super easy to do.

I'm curious, why do you need 4k threads though?
Reply With Quote
  #9  
Old 02-24-2010, 08:59
WhoCares's Avatar
WhoCares WhoCares is offline
who cares
 
Join Date: Jan 2002
Location: Here
Posts: 409
Rept. Given: 10
Rept. Rcvd 16 Times in 14 Posts
Thanks Given: 41
Thanks Rcvd at 155 Times in 61 Posts
WhoCares Reputation: 17
Use thread pool or I/O completion ports if you need many threads to do concurrent processing.

BTW: ErLang(_http://www.erlang.org) uses many light-weight VM processes to do concurrent processing.
__________________
AKA Solomon/blowfish.
Reply With Quote
  #10  
Old 02-26-2010, 01:00
SaNX SaNX is offline
ex-eVC cracker
 
Join Date: Feb 2010
Location: Russia
Posts: 61
Rept. Given: 1
Rept. Rcvd 31 Times in 13 Posts
Thanks Given: 0
Thanks Rcvd at 1 Time in 1 Post
SaNX Reputation: 31
On cracklab was written by ntldr:

"I've maked simple program.

Test system: Core i7, 12Gb RAM, Windows 2003 x64

x86 application without /LARGEADDRESSAWARE - 1599 threads
x86 application with с /LARGEADDRESSAWARE - 3222 threads
x64 application - 173116 threads (after that memory is ended)"
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SSDT in Windows Vista/7 x86 _MAX_ General Discussion 3 08-30-2012 02:56
Windows Vista x64 & kb932596 taos General Discussion 4 08-28-2007 03:27
Windows Vista OEM Activation Crack.. imagin General Discussion 26 03-10-2007 01:25
Windows Vista + SoftIce DrL General Discussion 10 08-22-2005 15:19


All times are GMT +8. The time now is 16:30.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( 1998 - 2024 )