. CPU number is 1(4), view the number of cores[[email protected] ~]# grep ' core ID '/proc/cpuinfo | Sort-u | Wc-l6-- View CPU The core number is 6(5), view the number of threads[[email protected] ~]# grep ' processor '/proc/cpuinfo | Sort-u | Wc-l12-- View CPU the number of bus threads is A ( 6 a core)Original works,
New programs adopt producer and consumer models. The producer speed is very fast, data is almost in the memory, and processing is very fast. Consumers need frequent I/O. Therefore, we plan to allocate different cores to producers and consumers.
The producer only needs one core, and the rest is allocated to the consumer.
I checked this information and the shell side has the taskset command available.
Taskset:
-P: The pid of the running process
-The spe
Multiple multi-core CPUs are now the mainstream servers. Many applications, such as Squid and nginx, have the ability to distribute processes or threads to different CPU cores.
How can we view the distribution of different processes in the CPU core.
Use the top tool and use the pgrep or pidof commands.
For example, to view the distribution of
The quad-core is a processor core that has four functions on one processor based on a single semiconductor. In other words, four of the physical processor cores are integrated into one core. The difference between the quad core and the dual core is that on multitasking, the CPU of the four cores open four programs to open four programs faster than the dual
There are several different processor information that you can obtain: Number of physical processors, number of cores, and number of logical processors, which can be different. Two dual-core hyper-threading (Enabled) processors are available on two physical processors, four cores, and eight logical processors.
The number of logical processors isEnvironmentClass, but other information can only be obtained th
1, view cpu physical number grep ' physical id '/proc/cpuinfo | sort-u | wc-l 2, view cpu core number grep ' core ID '/ Proc/cpuinfo | Sort-u | Wc-l 3, view the number of cpu threads grep ' Processor '/proc/cpuinfo | Sort-u | Wc-l 4, view CPU model Dmidecode-s processor-version 5, viewing
be tested after you control the size, 2Ncpu generally no problem) (often appear in the thread: Database data interaction, file upload download, network data transfer, etc.)Compute-intensive =ncpu (often appearing in threads: Complex algorithms)In Java: ncpu=Runtime.getRuntime().availableProcessors()========================= here can be skipped =============================================Of course the faction of a "Java Concurrency in Practice" also has a saying,For computationally intensive ta
Background environment:Two servers, configure 4u (per U6 core), 48G memory, install a good system;Problem:SQL Server clusters cannot be installed properly, and the cluster does not support 24-core CPUs.Workaround:After the CPU is changed to 8 cores, it can be successfully installed and then upgraded to the SP3 patch to support 24 cores.Reference:http://903706.blog.51cto.com/893706/406110This article comes f
Uncle also said that parallel and serial performance is improved by N times (N is determined by the number of operating systems and the number of cpu cores), and the performance is improved by n
Returned directory
Parallelism is. net4.5 focuses on the technology and is encapsulated into System. threading. in the Tasks namespace, the static class Parallel is provided for external users. We can directly use i
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.