Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Intel® Core™ i7-4771 Processor http://ark.intel.com/products/77656
For info, using this processor, it is mentioned to have 4 cores and 8 threads.
1. So 4 x 8 should be 32 right? Cause under my system monitor, i can only see 8 CPU, where are the rest 24? Using Debian system monitor, should be same for everyone.
2. Also when i typed pstree, i counted more than 32 threads, how is this possible? Is it only 32 process running at 1 time and rest are zombie?
Tks for reading.
Remember that, when a process or thread is said to be "running," it is time-slicing among the various available CPU(s). This status simply means that it is eligible to need CPU-time to be given to it ... that it is not blocked for any reason (waiting for an I/O operation to complete).
Nearly all workloads are "I/O-bound." They spend a minuscule amount of time consuming CPU resources before they initiate an I/O operation and then are blocked waiting for it to complete. So, the "ruling constraint" that determines how fast they do their job is not the speed nor the number of CPUs (cores), but the ability of the underlying hardware to perform I/O (and the availability of RAM, which leads to paging I/O...).
Basically, the workload, whatever it is, is ruled by mechanical speeds, not on-board silicon speeds.
Threading, properly deployed, allows the CPU to "keep busy" because, when one thread/process becomes blocked, there are still other runnable threads/processes that it can immediately switch to. The CPU(s) will still spend more than 90% of their time waiting, in most cases, but the number is still smaller than it otherwise would be.
"Multiple cores" are really only useful when you have a substantial CPU-bound workload that is capable of using the core's onboard caches [i](remember, multiple cores all compete for one memory-bus) ... a workload that is consistently able to consume full time-slices without becoming blocked for I/O ... on a system that can handle the amount of heat that such intense activities will generate.
Last edited by sundialsvcs; 11-18-2014 at 07:53 AM.
Your CPU has 4 physical cores. Each core can run 2 threads (due to Intel® Hyper-Threading Technology).
Thats why you can observe 8 threads, not 32.
System monitor shows 8 virtual CPUs, one per each thread.
Why you can observe more than 32 processes in pstree output? Because these threads doesn't run simultaneously. Tasks sheduler decides which task will be executed at moment depending on their priority.
There is a certain amount of confusion over the two different meanings of "thread". The hardware meaning in Intel's "hyperthreading" terminology vs. the usual software meaning.
Quote:
Originally Posted by CrazyCatLover
For info, using this processor, it is mentioned to have 4 cores and 8 threads.
1. So 4 x 8 should be 32 right?
They mean 4 cores per CPU package and 8 threads per CPU package, not 8 threads per core.
You have only one CPU package, so you have 8 total hardware threads.
Quote:
2. Also when i typed pstree, i counted more than 32 threads, how is this possible? Is it only 32 process running at 1 time and rest are zombie?
At most 8 (on your system) software threads are using hardware threads at any instant. Most software threads are doing I/O waits at any given instant. Software threads are distributed among hardware threads (in a manner that I don't really understand). Within those assigned to the same hardware thread, if more than one wants CPU time at the same time, the hardware thread is time sliced among them. If one hardware thread is under loaded while another is overloaded, software threads might get moved from the overloaded hardware thread to the under loaded one. That is the mechanism that I don't actually understand.
Ok, i sort of get it, some other questions, lets say i have a software thread called iceweasel. My iceweasel sort of slows down whenever i open too many stuff. How do i say it, the computer has a delay in reaction. I notice that my first cpu tends to have high activity 30%-80%, while the rest only has 1-2% just roughly value.
Can it be separated into 2 different hardware threads? If i can separate it, wont it be a lot faster? How do i do it in the most easiest way?
ps. I check and debian doesnt seem to be in the list of optimised os for Hyperthread technology. The stuff is proprietary and debian doesnt like proprietary. Could this be the problem?
Iceweasel has a single-process architecture. It leads (e.g. when opening a lots of pages) to high CPU usage for one of cores whilst other cores are idle. In other words, iceweasel's code not optimized for running in few threads.
My iceweasel sort of slows down whenever i open too many stuff. How do i say it, the computer has a delay in reaction. I notice that my first cpu tends to have high activity 30%-80%, while the rest only has 1-2% just roughly value.
Can it be separated into 2 different hardware threads? If i can separate it, wont it be a lot faster?
I think iceweasel is not slowing down due to CPU load, but due to some other reason. That might be disk I/O or it might be waiting for responses from the net. I have noticed that when Firefox is loading from multiple sources at once, it seems unable to respond to incoming packets effectively. It seems to wait for some expected packets that are externally delayed, while failing to process other packets that have arrived.
Most programs are single threaded, so even if they are limited by CPU (rather than disk or net) they still only use at most one hardware thread.
Every modern OS has methods to try to best use HT.
A core i7 is a fantastic product. It will run Debian just fine in no uncertain terms.
As to what is going on, we'd need to know what pages, how many of them, what resources the pages require, what resources your system is using during this so called high load state. I'd bet you have more than a few cores just sitting around.
Network crc can consume a lot of cpu if not offloaded to nic.
Hi,
Here is a sample in iceweasel
youtube song on auto repeat, lecture, pdf notes opened in iceweasel, google search results
usually total 6 to 7 webpages
running add on gnome shell, youtube replay, ghostery, adblock, lightbeam the usual.
have gnash but i switch off as it doesnt work with youtube replay button....
So, see any problems?
When you say that the computer has a human-visible "delayed reaction," this, in and of itself, is a direct indication that the I/O queues are piling-up. You'll probably see that the disk-drive activity light is flashing quite steadily.
If this is accompanied by idle processes or threads, this is a further indication. If there were anything for them to be doing, then they would be doing it.
"Hyperthreading," and "cores" in general, are actually quite over-rated. The hardware designers are reaching the current limits of how "small == fast" the technology can be, so they are duplicating copies of it across the chip and calling each one a "core." Trouble is, all of them share the same "pathway to the outside world," and it's a one-lane road. There's dispatching of the workload among the cores, yes, but that's still mostly to get "great benchmarks" for the chip itself, which sells more chips.
Programs such as your "iceweasel" are often built single-threaded because they can work very efficiently using a simple select() polling-loop. There's almost nothing for the CPU to do anyhow. You can always run more than one copy of the thing, in two different terminal sessions, but you will most likely find that the completion-rate is not doubled; it might actually be reduced. C'est la guerre . . .
When you say that the computer has a human-visible "delayed reaction," this, in and of itself, is a direct indication that the I/O queues are piling-up. You'll probably see that the disk-drive activity light is flashing quite steadily.
If this is accompanied by idle processes or threads, this is a further indication. If there were anything for them to be doing, then they would be doing it.
"Hyperthreading," and "cores" in general, are actually quite over-rated. The hardware designers are reaching the current limits of how "small == fast" the technology can be, so they are duplicating copies of it across the chip and calling each one a "core." Trouble is, all of them share the same "pathway to the outside world," and it's a one-lane road. There's dispatching of the workload among the cores, yes, but that's still mostly to get "great benchmarks" for the chip itself, which sells more chips.
Programs such as your "iceweasel" are often built single-threaded because they can work very efficiently using a simple select() polling-loop. There's almost nothing for the CPU to do anyhow. You can always run more than one copy of the thing, in two different terminal sessions, but you will most likely find that the completion-rate is not doubled; it might actually be reduced. C'est la guerre . . .
This post is an oversimplification of the problem, and is quite dismissive of the advantage you get from having multiple cores. Just because some processes can't make use of them doesn't mean they are "over-rated".
Every process has a bottleneck (otherwise they would all run instantly). For many processes that bottleneck is the speed of one CPU core, for others it's the total processing power of all CPU cores, for others it's the memory bandwidth, and for others still it's the disk I/O speed. If you want the process to run faster, you need to fix (or at least improve) its bottleneck. Yes, if a process's bottleneck is the disk I/O speed, then throwing more or faster CPU cores at it will accomplish nothing, but that's simply because they're not addressing the issue, not because they're "over-rated".
The OP needs to find what is holding back his system and address that. Based on this comment:
Quote:
My iceweasel sort of slows down whenever i open too many stuff. How do i say it, the computer has a delay in reaction. I notice that my first cpu tends to have high activity 30%-80%, while the rest only has 1-2% just roughly value.
His problem is probably not CPU-related, so now it's time to figure out what is the cause of the problem.
So, OP, now it's time for you to fill us in on everything else about your system. Memory capacity, speed and usage, details about your disk(s) and what it/they are being used for (capacity, available space, speed, etc.).
Last edited by suicidaleggroll; 11-20-2014 at 02:35 PM.
Hmm it cant be hardware right, pc less than a year. Intel Core i7 3.5GHZ, Ram 8 GB, Hard disk 2 TB shared with windows. I gave roughly 500GB to debian. Data from "top" shows I only used around 1.5GB ram. I do suspect something, my graphics card is AMD Radeon. Works fine on windows. For Linux, I am using the amd catalyst version, yes I could use the free radeon version but colour and stuff is not as good, and could not fully load gnome, some features will be missing. The amd catalyst version has some problem too, sometimes like maybe 10% of the time when I open debian , it doesn't load into gnome at all, what appears is black screen and lines of words and numbers which goes on and on, although it usually solves itself when I press restart button 2 or 3 times, so its better than open source version which is why I use it. I check debian website and it doesn't have rc bugs so yep plus I dunno how to fix anyway so can only wait. If it gets into gnome, every program works like it should be, so I dunno if it may or may not be related?
Yep, installed the AMD64 version, I don't use bios, I use UEFI, other than hard disc space of 500 GB, other configuration and stuff all done by debian, I default on everything given by debian installer, so I assume configuration should be right.
I have heat monitoring on my windows side, it has never flag anything, I assume heat on linux should be ok too. The delay stuff never appeared on windows side at all unless I just log in and suddenly click a lot, but everything is always up in 5 secs or less.
I will make it as solved since my original question is already answered. Tks a lot.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.