有限的线程池。
为什么要用线程池?
Guidelines for effective use of thread pools.
有效使用线程池的准则。
Single-context and multi-context thread pools.
单上下文和多上下文的线程池。
The following thread pools will typically need to be tuned
下列线程池通常需要调优
The important tunable options associated with thread pools are shown in Table 2.
与线程池相关的重要调优选项如表2所示。
Tuning the appropriate thread pools to restrict the number of concurrent threads.
调优适当的线程池以限制并发线程的数量。
In nearly every server application, the question of thread pools and work queues comes up.
几乎在每个服务器应用程序中都会出现线程池和工作队列问题。
The portlet displays the thread pools available on the server and the size of each pool (Figure 1).
此Portlet显示了服务器上的可用线程池以及每个池的大小(图1)。
Table 3 shows the default thread pool sizes and inactivity timeouts for the most commonly tuned thread pools.
表3列出了最常调优的线程池的默认线程池大小和静止超时。
In a typical WebSphere Application server V6.x server, there are four main types of thread pools to be considered.
在一个典型的WebSphereApplicationServerv 6 . x服务器中,需要考虑四个主要线程池类型。
The TPL also has a new set of features not seen in either threads or thread pools. For example, Tasks have a safe Cancel method.
TPL还拥有一套从前的线程或线程池所不具备的新功能,例如任务拥有一个安全的Cancel方法。
The Common Language Runtime has always had basic support for parallel programming in the form of locks, threads, and thread pools.
通用语言运行时(Common LanguageRuntime,CLR)以锁、线程和线程池的形式为并行编程提供基本的支持。
Designing thread pools involves many considerations, such as pool sizing and management techniques that are out of this article's scope.
线程池的设计涉及到多方面的考虑事项,例如池的大小和管理技术,这些内容超出了本文讨论范围。
Because the pattern demonstrated above is so effective, it is relatively simple to extend it by chaining additional thread pools with queues.
因为上面介绍的模式非常有效,所以可以通过连接附加线程池和队列来进行扩展,这是相当简单的。
You can get statistics, such as Pool Max, Lowest Recorded, Highest Recorded, and Threads in Use for all defined thread pools, as shown in Figure 3.
您可以获取所有定义了的线程池的统计信息,如PoolMax、LowestRecorded、Highest Recorded和Threads inUse 等,如图 3 所示。
Using asynchronous message passing and pipelining, it promises to offer more control than thread pools and better performance than manual threading.
借助于异步消息传递与管道,它可以提供比线程池更好的控制,也比手工线程方式具备更好的性能。
One benefit of thread pools is that they generally perform well relative to the alternative scheduling mechanisms, some of which we've already discussed.
线程池的一个优点在于:相对于其它替代调度机制(有些我们已经讨论过)而言,它们通常执行得很好。
In this article, Brian Goetz explores the motivations for thread pools, some basic implementation and tuning techniques, and some common hazards to avoid.
本文中,BrianGoetz探讨了线程池的动机、一些基本实现和调优技术以及一些要避免的常见危险。
When using custom component-scoped thread pools (Figure 3), each worker thread in the pool is initialized with a daemon thread created by the WorkManager.
在使用自定义组件范围的线程池(图3)时,将使用WorkManager创建的守护程序线程初始化池中的每个工作线程。
Overall, the general best practice is to determine which thread pools service tasks that require a DataSource connection and to size the pools accordingly.
总的来说,通用的最佳实践是确定哪些线程池服务任务需要DataSource连接并相应调节池的大小。
Part 2 will offer information on other advanced console features, including thread pools statistics, Geronimo plug-ins, redeploying an application, and more.
第 2部分将提供关于其他高级控制台功能的信息,其中包括线程池统计、Geronimo插件和重新部署应用程序等。
However, as in the case of "growable thread pools" above, this solution is not perfect: queuing in the AIO facility introduces additional overhead and latency.
不过,对于上述的“可增长线程池”,此解决方案并不是十全十美:在AIO工具中排队会带来额外的开销和延迟。
More importantly, you can also define which solution component USES which bus, thus ensuring that solution components using different buses also use different thread pools.
更重要的是,还可以定义哪个解决方案组件使用哪个总线,从而确保使用不同总线的解决方案组件也使用不同的线程池。
Overall, however, the concern remains that misbehaving components can use and lock all available threads for a process, even if you have properly configured isolated thread pools.
但是,总的来说,问题依然存在:行为不良的组件能够使用并锁定一个进程的所有可用线程,即使您已经正确配置了隔离的线程池。
In the future, we plan to combine the thread pools from different services together into a single work-management infrastructure that can be used to balance between these different workloads.
未来,我们打算将不同服务的线程池组合为一个单独的工作管理基础设施,用于均衡负载。
A significant risk in all kinds of thread pools is thread leakage, which occurs when a thread is removed from the pool to perform a task, but is not returned to the pool when the task completes.
各种类型的线程池中一个严重的风险是线程泄漏,当从池中除去一个线程以执行一项任务,而在任务完成后该线程却没有返回池时,会发生这种情况。
WebSphere Application Server is designed to process a large number of parallel short-time tasks, and work queues and thread pools are two components that are used often to handle parallel workload.
WebSphereApplicationServer旨在处理大量的并行短时间任务,工作队列和线程池是两个经常用来处理并行工作负载的组件。
Proper management of the thread pools is important, because threads are fairly expensive resources in terms of memory consumption in the server, as well as other low-level operating system resources.
正确管理线程池非常重要,因为线程对于服务器中的内存使用量以及其他低级操作系统资源而言是相当珍贵的资源。
Because application servers use limited thread pools, continuous use of a thread prevents an application server from handling other requests while sending or receiving a message using these protocols.
由于应用服务器使用有限的线程池,持续使用一个线程将使应用服务器在使用这些协议发送和接收消息时无法处理其他请求。
应用推荐