2

I have two machines - a relatively cheap laptop and a high end desktop. My laptop sometimes runs slowly doing various tasks that would be quick on my desktop. My first guess is that I'm using most of my CPU or RAM, but looking at the performance tab of the task manager, I see that neither are ever really being maxed out.

So why is my laptop running relatively slowly? Why doesn't it just assign more resources? My desktop is able to handle it fine, so it cant be a case of bad design of the program, but something else is slowing it down.

5
  • 4
    Need to compare product specs such as CPU, ram, buss speed, HD speed, and windows install options to be able to answer this. Too many variables to figure out based on what you said. Things to try, clean the registry, run a malware scanner (not to be confused with your always running anti-virus software). (If I were doing those to I would use ccleaner and malwarebytes but that just my way... feel free to use your favorite product). Another thing I do is open task manager and click the CPU col to sort it. I watch what gets a lot of CPU as I use the computer, and then sort by memory.
    – Tyson
    Jul 27, 2014 at 1:15
  • The laptop does not have the fancy graphics card that the desktop unit has. Jul 27, 2014 at 3:23
  • For this sort of thing more (much more) information about the system is usually needed. At a minimum, describe a reproducible test case. Jul 27, 2014 at 3:34
  • 2
    Note that IO operations are several orders of magnitude slower than CPU registers or RAM, and requires operations across a shared bus, so an application that performs a lot of io on a single file or repeatedly accesses one or a small number of files, or requests a good number of files from disk all at once, will spend most of its time performing context switches and waiting for interupts indicating a DMA operation has completed, and the thread can resume work. Jul 27, 2014 at 5:16
  • "My first guess is that I'm using most of my CPU or RAM." Your reasoning is backwards. The more RAM and CPU you use, the faster your system runs. That's why it's nice to have lots of RAM and CPU. Sep 3, 2016 at 8:24

1 Answer 1

5

First of all, the CPU's your machines have are probably a few CPU's combined into one (more physical cores). It is even possible that each physical core has a few logical cores.

Second - the usage on your laptop may not be maxed out, but if the program is single threaded then it can only use one, and only one core, not more. This means that if you have four cores, and windows task managers shows a 25% CPU usage on one program, then it means that one program uses the maximum speed of one core, it can therefore not perform faster.

To take an example, my i7-3xxx processor has 4 physical cores. Yet each core has two logical cores, which means I have a total of 8 cores to my disposal. Windows then can assign any program execution to any core to maximize efficiency. If the program you run can only use one core then Windows can not do anything about it (or any other OS as far as I'm informed) other than let the program execute at the maximum speed of one core.

Third - RAM and CPU usage can be almost 0%, this does not mean the the hard disk is not in use. Even on newer hardware hard disk are almost always a bottle-neck. When the hard disk is being used at maximum the total performance of the computer seems to always decrease. A hdd being used at maximum especially hits the applications that do like to move data around. Application's that don't use HDD that much still will get slower but are not being impacted at the same rate as apps which require the HDD.

Also, tip, if any of the above reasoning does not apply then it's just because your desktops' hardware is better. Computers are complex and every parameter does matter - ram speed, ram size, bus speed, cpu cache(s), cpu speed, supported cpu instructions, hdd rpm, hdd speed, software configuration, background processes, etc..

3
  • Im 100% sure that none of these program are single threaded. No self respecting program has been single threaded for a looooonnng time. And both computers are multi-core. Desktop is 4 core, laptop is 2 core I believe. Jul 27, 2014 at 1:33
  • Well I am a software hobby-developer and I can mostly say that I almost never write multi threaded programs unless really needed for performance reasons. but I did consider your logic and added one new probable source of your laptops slowniness! :)
    – Gizmo
    Jul 27, 2014 at 1:39
  • Key word is hobby. When I doddle for fun I never make things multithreaded either (though there is a lot of multithreading done for you under the hood), its just not worth the effort. But when you have a real product it would be silly not to. Jul 27, 2014 at 1:42

Not the answer you're looking for? Browse other questions tagged .