Exetools

Exetools (https://forum.exetools.com/index.php)
-   x64 OS (https://forum.exetools.com/forumdisplay.php?f=44)
-   -   Vista x64 , Windows 7 limits? (https://forum.exetools.com/showthread.php?t=12453)

jump 09-09-2009 17:33

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

Git 09-09-2009 18:33

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

jump 09-09-2009 18:55

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

Git 09-09-2009 19:34

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

Evilcry 09-09-2009 19:40

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

Git 09-10-2009 02:14

> 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

Evilcry 09-11-2009 13:56

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

_Sigma 02-24-2010 06:01

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?

WhoCares 02-24-2010 08:59

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.

SaNX 02-26-2010 01:00

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)"


All times are GMT +8. The time now is 08:01.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX