A disadvantage in running Linux, on a multi-core CPU that’s threaded.

One of the facts about modern computing is, that the hardware could include a multi-core CPU, with a number of virtual cores different from the number of full cores. Such CPUs were once called “Hyper-Threaded”, but are now only called “Threaded”.

If the CPU has 8 virtual cores, but is threaded as only 4 full cores, then there will only be a speed advantage, when running 4 processes. But because processes are sometimes multi-threaded, each of those 4 processes could consist of 2 fully-busy threads, and benefit from a further doubling of speed because each full core has 2 virtual cores.

It’s really a feature of Windows to exploit this fully, while Linux tends to ignore this. When Linux runs on such a CPU, it only ‘sees’ the maximum number of virtual cores, as the logical number of cores that the hardware has, without taking into account that they could be pairing in some way, to result in a lower number of full cores.

And to a certain extent, the Linux kernel is justified in doing so because unlike how it is with Windows, it’s actually just as cheap for a Linux computer to run a high number of separate processes, as it is to run processes with the same number of threads. Two threads share a code segment as well as a data segment (heap), but have two separate stack segments as well as different register-values. This makes them ‘enlightened processes’. Well they only really run faster under Windows (or maybe under OS/X).

Under Linux it’s fully feasible just to create many processes instead, so the bulk of the programming work does not make use as much of multi-threading. Of course Even under Linux, code is sometimes written to be multi-threaded, for reasons I won’t go into here.

But then under Linux, there was also never effort put into the kernel recognizing two of its logical cores, as belonging to the same full core.

(Updated 2/19/2019, 17h30 … )

Continue reading A disadvantage in running Linux, on a multi-core CPU that’s threaded.

How The Use Of Steam Can Hinder Efficiency.

There exists a concept in Thermodynamics, which describes theoretical limits in the efficiency of all possible heat-engines. This principle states, that if we have a heat-source and a heat-sink, each has an absolute temperature. The ratio between these temperatures defines the highest-possible output of free energy from a heat-engine, as well as the lowest-possible consumption of free energy by a refrigeration-device.

The principle is based on the axiomatic assumption, that there exist no perpetual-motion machines, which simply convert ambient heat into free energy. If we could connect a heat-engine to an air-conditioner, and if these limits could be exceeded, we would have such a perpetual-motion machine.

This also explains why in practice, air-conditioners, refrigerators and heat-pumps can transfer heat from a colder source to a warmer sink, with the energy in heat far-exceeding the electricity consumed. They are all examples in which the ratio of absolute temperatures is close to 1.0 . Actually, what matters is the ratio of the temperatures of the working-fluid in each case, which is actually more oblique than the ratio for air temperatures, because heat-exchangers are never perfectly efficient. And the working-fluids used tend to be similar, because the temperatures at which those systems are designed to work, are also similar.

This also implies that if we wanted to build a heat-engine that uses small temperature-differences to generate electricity, large reserves of heat would be needed as a source, and sent to the sink, before even small amounts of electricity result – which might sometimes be available – but which constrains the system, regardless of what type of heat-engine is used.


Well, in Industrial Power Generation, the temperatures which the heat-source can be run at, depend firstly on what type of fuel is burning, but also depend on the range of temperatures at which water will boil. At 1 atmosphere of pressure, water only boils at 100⁰C, which is also 373K, while the external temperature tends to be around 273-300K .

Actually, by keeping the water boiling at much higher pressures, its boiling-point can also be increased. But it is generally not boosted beyond 200⁰C , which corresponds to about 473K . And so, according to basic principles, no power station based on water and steam, can be more than 50% efficient.

(Edit 05/12/2017 : Additionally, my late father, who was a professional Engineer, used to tell me, that something prevents a steam turbine from being more than 50% efficient. But, this is not a subject I know about, even though it would additionally limit the maximum efficiency of steam-turbine-based power-stations, to approximately 25%. )

In theory, if we could operate our heat-engine at 1000K, and its heat-sink still at 300K, we could achieve efficiencies closer to 70%. Mind you, that that point our heat-source might resemble a lightbulb, more than what we are used to, but this would still obey the rules of Thermodynamics.

My only point being, that the use of water, and its associated boiling-points, is an arbitrary decision. There is no magical reason why we must use it. We could use vaporous sodium if we knew how to work with it safely.

If one breaks out, a sodium-fire is a nasty hazard, much more dangerous in its nature than wood or oil-fires already are.

Dirk

Continue reading How The Use Of Steam Can Hinder Efficiency.

My Server was just down for an Upgrade.

From 14h30 until 15h30, I needed to do some upgrading to the hardware of the computer which I name ‘Phoenix’.

Link To Previous Posting

This old computer from 2008 may be running the most powerful Linux version at my disposal, in 64-bit mode, and its dual-core CPU may clock up to 2.6GHz, but until now, it had still only possessed 2GB of RAM! This box still uses DDR2 RAM modules, and I had upgraded it from 2x 512MB to 2x 1GB in the year 2008. But what I needed to do today, was to upgrade it to 2x 2GB, finally giving it its maximum of 4GB of RAM.

This time around, I no longer felt I’d have the dexterity to prevent static damage to the RAM modules, just by controlling the sequence with which I touched parts. And so this time, I also felt I needed to use an actual anti-static bracelet.

Further, the CPU heat sink was plugged full of dust, so that the CPU fan was no longer able to push any cooling air through it. I knew for a long time that this also needed to be remedied, but had procrastinated in doing so. While I had the tower open today, I also took care of the dust in the CPU heat sink, with a bottle of compressed gas.

One reason I was not so eager to do this much-needed work, was the knowledge that if I had botched this, I’d have lost my one and only server. But I was also reminded, that if the server was to fail, because the CPU was consistently running too hot, the outage would take longer than 1 hour to fix. And so I finally chose the 1 hour preventative action.

I am glad that now the CPU is being cooled properly again, and that I finally have 4GB of RAM on this 64-bit machine.

Also, this was one situation in which I could not post a Maintenance Mode Notice on my blog, because for 1 hour, there was no server to render the Maintenance message screen.

Dirk