mod to run in single thread mode?

Discussion in 'Modding and Customization' started by stabu, Feb 5, 2009.

  1. stabu

    stabu

    Joined:
    Oct 15, 2008
    Messages:
    20
    Likes Received:
    0
    I want to bypass the double threading on my linpus A110.

    The two threads are fairly well deeply coded into the Intel Atom processor.

    I heard that by including the term "noht" on the kernel boot line, I could make this happen.

    So I went into "/boot/grub/grub.conf" on my A110 and found bootlines, and I put "noht" in both (just to make sure).

    Then I booted up but I still got two threads.

    Has anybody got other ideas on how to do this?
     
    stabu, Feb 5, 2009
    #1
  2. stabu

    Chaos

    Joined:
    Jan 31, 2009
    Messages:
    35
    Likes Received:
    0
    may i ask why you dont want hyperthreading? without hyperthreading, your AAO is going to be half as fast.
     
    Chaos, Feb 8, 2009
    #2
  3. stabu

    stabu

    Joined:
    Oct 15, 2008
    Messages:
    20
    Likes Received:
    0
    Hi Chaos,

    Thanks for the answer.

    You say so, because you or a friend tried it? Or, your common sense says so?

    My common sense doesn't say so. My aspire one says it has two processors running at 800MHz, i.e. that's two threads. This divides the single 1.6G cpu into two, both running half as fast (at most! ignoring overhead).

    OK, so to some applications who can use the two threads this doesn't matter. mp3 encoding (lame) though only can use 1 thread. So the max clock rate you'll pull out is 800MHz.

    That's why I want my 1.6GHz single thread CPU back. Of course, if you stick to multihtreaded apps, or you often have two apps running in parallel, well you won't care about this.

    What sense do you make of that?

    At the moment, I think that this issue can only be solved with the right BIOS. I was over at macles' site and left a comment there. No replies. The possibility is, that there is no BIOS that can do this right now.

    I'm interested in any further comments.
     
    stabu, Feb 21, 2009
    #3
  4. stabu

    ronime

    Joined:
    Nov 3, 2008
    Messages:
    486
    Likes Received:
    0
    Location:
    West Yorkshire, UK
    Sorry stabu, but you are sadly mistaken.

    The Atom does not have two cores like a true dual core processor, it has two instruction queues. When an instruction in one queue is stalled pending completion of an operation (e.g. fetching some value from memory) then the CPU can switch to execution of an instruction in the other queue.

    If you disabled hyperthreading then there is every possible chance that the CPU would spend more time idling waiting for external operations to complete and the number of instructions processed in a given time would be reduced. The net effect would be that the system would appear to be running more slowly.

    Unless you are running MSDOS the chances are that there are several (hundred) processes and therefore several threads all attempting to run simultaneously.

    You seem to want to disable hyperthreading and compromise general system performance so that a single instance of a single threaded MP3 encoder can run faster. Would it not make more sense to run two instances of lame in parallel or find a batch MP3 encoder that is multi-threaded?
     
    ronime, Feb 21, 2009
    #4
  5. stabu

    stabu

    Joined:
    Oct 15, 2008
    Messages:
    20
    Likes Received:
    0
    Hi ronime,

    thanks for the answer, it's good to debate this and clarify what is often a foggy but important issue.

    I don't mind being sadly mistaken, but after your good discussion, I still can't see the light.

    What I gather is, that you are referring to OS hyperthreading. There I agree. It does not make sense to turn off hyperthreading there. Maybe that's what "hyper-" threading refers to .. the threading in the OS.

    However, my concern was further back, before the OS kicks in. When I says the aspireone says it sees processors, I didn't say I believed it. I'm using the linpus and I talk about the output of "cat /proc/cpuinfo", which gives two processors. I know full well, that the Atom processor inside is only single core (the price told me that :)), but that the threading causes the OS to think it's two by activating threading before the OS kicks in.

    That's why I was thinking I need to get to the BIOS to get the whole system to work at 1.6GHZ instead of 800GHz, which is my main aim. It's not only for mp3's either .. it's also out of interest. I do, in fact, do what you suggest, run two instances of lame.

    Thanks for the answer though, it has motivated me to look into this more deeply. Cheers.

    I don't know if I'm being clear or not. But I'm getting the feeling that nobody is doing this ... which kind of already makes it a bad idea.
     
    stabu, Feb 22, 2009
    #5
  6. stabu

    edit_text

    Joined:
    Feb 22, 2009
    Messages:
    4
    Likes Received:
    0
    Your assumption that your core is running at 800Mhz is wrong. I don't know if you have some software reporting that, if so it is probably due to power management. I run an XP AAO, cpuz does report 800Mhz at idle. If I load Guild Wars in the background, the multiplier doubles from 6 to 12 and gives a speed of 1.6Ghz. The behavior in Linux should be the same. The only gains I can see from disabling HT would be gaining the overhead from HT back, but I would bet that overall system performance, even in single threaded apps, will be lower.

    e_t

    *edited to correct grammatical errors
     
    edit_text, Feb 22, 2009
    #6
  7. stabu

    Guest Guest

    You're probably lucky that the people in this forum are polite, I know if you posted this somewhere else you wouldve just gotten laughed at for the stuff you've just said about hyperthreading.

    As said before, Intel Atom has cpu throttling which lowers the clock speed if the cpu is idling. So its 800Mhz when doing nothing and 1.6GHz when you need it. This is just to save power. Hyperthreading doesn't halve your cpu speed into two CPUs, it merely makes a single CPU be able to process two threads. I have no idea where you would've come across that idea.

    Secondly, hyperthreading has nothing to do with your OS. Its all contained in your CPU. The OS will just be fooled into thinking its the same as any other dual CPU or dual core system. Disabling hyperthreading won't give you any performance gain.

    You can just google hyperthreading if you want to find out more about it.
     
    Guest, Feb 23, 2009
    #7
  8. stabu

    stabu

    Joined:
    Oct 15, 2008
    Messages:
    20
    Likes Received:
    0
    well it wouldn't be quite fair to laugh at me, as I have qualified my statements and have not generalised (I stated that for multi-threaded apps, this idea is not interesting).

    It all sounds too much like a "free lunch", that's all. But I better stop before I'm laughed out of the house.
     
    stabu, Feb 23, 2009
    #8
  9. stabu

    ronime

    Joined:
    Nov 3, 2008
    Messages:
    486
    Likes Received:
    0
    Location:
    West Yorkshire, UK
    Seriously, we are not ridiculing you. We just hope to reassure you that your Atom is performing as intended and that you should not worry unduly or despair.

    Out-of-order core designs need a relatively large area of silicon for implementation. The Atom is a low-cost design and is therefore in-order to achieve this. It is inevitable that an in-order core design will suffer from instruction pipeline stalling and therefore providing parallel instruction pipelines (i.e. HyperThreading - HT) is one way of mitigating against the potential performance issues.
     
    ronime, Feb 23, 2009
    #9
  10. stabu

    GauntMan

    Joined:
    Aug 25, 2008
    Messages:
    17
    Likes Received:
    0
    stabu:

    There can be a point to disabling Hyperthreading at certain times. My full size laptop has a P4 3GHz HT CPU. When enabling HT i BIOS and running a CPU intense application WindowsXP (sp2) only used 50% of the total CPU power. Somehow it maxed out one virtual core BUT the balance of HT never shifted the rest of the power from the unsused virtual core so half of the time the cpu was doing nothing. Sort of saving itself from something. When I disabled HT only one core shoved up and I ran a benchmark and got twice the power. This is probably a problem related to BIOS and the hardware somehow but the interesting bit is that after installing SP3 HT began working as it should. On the AspireOne however HT appears to be working properly.
     
    GauntMan, Feb 24, 2009
    #10
  11. stabu

    edit_text

    Joined:
    Feb 22, 2009
    Messages:
    4
    Likes Received:
    0
    You are right about that, If you have a program that only uses one thread then it will only be able to take full advantage of one "CPU." However, that is the same amount of power it would have access to even if HT were disabled. So for the majority of software it may sound like HT is a waist. The real power of HT, or true multicore, is the ability to do two things at once. In modern software that may be two threads, or it may be offloading some background task to the other core. HT really just makes things smoother without the need for the die space of an additional core. Granted, it is nowhere near as good as a true second core, but it was never supposed to be. For a little more information, I would check out wikipedia. Keep in mind that any modern OS is aware of HT, it does not treat it like a true second core, the task scheduler has the ability to tell the difference between the physical core and the logical core.

    To recap, the physical core is the same with or without HT. The logical core, only uses CPU time that is not being used by the physical core. I'm am sure that there is some overhead involved, but if the OS is HT ready this should not be much of an issue. Intel says that HT can boost performance 15%-30% but it is very application dependent . That being said, there are some programs that do not like HT. As I understand most developers are aware of these bugs, and have ironed out any problems. If you still wish to disable HT, I think you may be out of luck as far as the AAO is concerned.

    e_t
     
    edit_text, Feb 25, 2009
    #11
  12. stabu

    ihartley

    Joined:
    Dec 28, 2008
    Messages:
    23
    Likes Received:
    0
    The processor is the processor is the processor. It runs as fast as it runs.

    Hyperthreading - as already said - just allows two instruction queues so that when the active thread is waiting the processor can do some other processing. If this were not the case then the processor would wait and do nothing. Processors are waiting a LOT of the time, e.g. for disk access, memory access, etc. Just look at the timings and latency of your memory!

    Scheduling of processes is controlled by the OS. If the OS reports 50% CPU utilisation then this is really 100% utilisation, in that the active process will consume all resources (the other "CPU" will be at 0%). With hyperthreading, it's still possible for other instructions to execute whilst the active process is waiting, but as soon as it is ready the processor will resume executing it. Since the OS perceives it to be 2 processors then that's why you get 50%. (Have you never had a program run out of control - at 50% - so much that you can't even get keyboard or mouse response......)

    Disabling hyperthreading will have no effect other than to slow your PC down, and since some OS processes will always have a higher priority than your apps this will slow down your app. If you want a process to consume all resources then set it at "real time priority". The OS will then execute it before all others that are ready (except OS processes that are privileged).

    * this information is not 100% factually accurate, but to make it so will take a lot more time and effort. Above is a good description of what is really going on
     
    ihartley, Feb 25, 2009
    #12
  13. stabu

    jackluo923

    Joined:
    Aug 26, 2008
    Messages:
    843
    Likes Received:
    0
    In order to run any program in any modern operating system, the OS will first need to load couple hundred threads for OS it self then load the application thread. So the computer as a whole, no matter what program its running, is multithreaded. The current windows XP when idling has about 350 threads running.

    If you want to disable the "HT" core, you can, both in linux and windows XP.

    For XP, you can limit the number of cores running.
    1) start msconfig
    2) go to boot.ini tab
    3) click advanced options button
    4) Check /maxproc= and select 1 in the selection box
    5) Click OK and restart.

    For linux:
    Look for console commands. There's definetly a command for processor limit, but i'm too lazy to look it up for you.


    If you find the processor speed to fast and want to disable HT. Try this instead:
    Windows XP - limit your processor speed to 800mhz through speedstep. There are many ways to do this.

    For Linux
    Type this in console
    sudo cpulimit -p pid -l (number between 1-100, without bracket)

    or use speedstep
     
    jackluo923, Feb 26, 2009
    #13
  14. stabu

    GauntMan

    Joined:
    Aug 25, 2008
    Messages:
    17
    Likes Received:
    0
    The problem with my laptop was that it showed 50% usage and it really was only 50% of the power bacuse I got twice the benchmark score when I disabled HT. This was probably some hardware/chipsetdriver problem that messed up windows internal handling and taskmanager and somehow was solved in SP3.
     
    GauntMan, Mar 1, 2009
    #14
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.