Author Topic: Multi-core processor usage  (Read 7231 times)

macaroni

  • Regular Poster
  • **
  • Posts: 33
    • View Profile
Multi-core processor usage
« on: February 01, 2010, 06:47:18 pm »
Since LMCE is based on the 32 bit platform will it utilize more than one core on a multi-core processor?

jimbodude

  • Guru
  • ****
  • Posts: 372
    • View Profile
Re: Multi-core processor usage
« Reply #1 on: February 01, 2010, 08:26:33 pm »
LinuxMCE is a system - it exists across many completely separate processes, and communicates with other more generic processes - such as the MySQL database and Apache web server.

Since a LinuxMCE system consists of lots of independent processes which are run in parallel, there is no doubt that LinuxMCE will take advantage of a multi-core processor.

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Multi-core processor usage
« Reply #2 on: February 02, 2010, 09:18:03 pm »
moreover, 32bit and 64bit have nothing whatsoever to do with the number of cores and whether they will get used or not. as jimbodude said....

theteju

  • Guru
  • ****
  • Posts: 180
    • View Profile
Re: Multi-core processor usage
« Reply #3 on: February 07, 2010, 09:41:49 pm »
I do not want to start another thread , Yet I have silly question to ask.

My system is running on presscott D P4 processor. its 8.10 beta dvd install. everything working fine at the moment.

Is it possible to upgrade the processor ?
In other words.. If i throw a core 2 duo in it.. will it work fine? I do not want to reinstall :P  Hope you understand my question.

any reply is greatly appreciated.

Thank you all.

MANDINGO

  • Guru
  • ****
  • Posts: 204
    • View Profile
Re: Multi-core processor usage
« Reply #4 on: February 08, 2010, 08:23:01 am »
As i mentioned and answered your question in the irc channel

Kubuntu will recognize the system as haveing a multicore and will use a smp kernel

Now lmce doesnt take advantage of multicore based system meaning theading to one processor then the next etc....

just because an application runs on a multicore or the os is a multicore system, the application in question must know how to use and take full advantage of that feature...

Hence lmce will not know the difference if on a multi or single processor based system but the OS will
Ex.. MySQL can balance load among processors and you can choose within the application how many to use
For a Current List of Plug and Play Capture Cards/Devices
http://wiki.linuxmce.org/index.php/Capture_Cards

mcc

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Multi-core processor usage
« Reply #5 on: February 08, 2010, 12:15:34 pm »
What about distributing of IRQs between cores? Is it working properly or it's recommended to install irqbalance to take advantage of having multicore environment?

BTW - IMO multicore can be beneficial while we have a few simultaneous users watching different content. There is a lot of processes to be split between cores. Now I'm completing HW for my new house, and decided to go into dedicated core + 2-3 MDs. Core would be athlon II x2 (45-65W), and MDs based on IONs. I hope it will work smoothly.


Best regards,
MCC

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Multi-core processor usage
« Reply #6 on: February 09, 2010, 08:42:44 am »

Now lmce doesnt take advantage of multicore based system meaning theading to one processor then the next etc....

just because an application runs on a multicore or the os is a multicore system, the application in question must know how to use and take full advantage of that feature...


Mandingo - could you explain in more detail what you mean by this?

I can confirm for certain that many of LMCE's key subsystems are multi-threaded (MySQL, Myth, DCERouter, Asterisk, AppServer, HAL, Disk_Drive, OrbiterGL, Xine, MPlayer, etc), and all do get different thread instances within the same process assigned to different cores. And processor affinity is low, so there is nothing stopping a thread from moving from one processor core to another over its lifetime.

So whilst its true, LMCE doesn't necessarily know that it is on a multi core system, that isn't really relevant - the OS assigns the processes and threads between the cores, so by definition LMCE does take advantage of multicore systems!

Try running:

ps -eLF

And look at the number of threads each process has, and which core each is executing on....

mcc

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Multi-core processor usage
« Reply #7 on: February 09, 2010, 01:11:53 pm »
Had anybody tried to run CORE in HA environment (ie 2 PCs)?

BR,
MCC

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Multi-core processor usage
« Reply #8 on: February 09, 2010, 09:06:50 pm »
By HA I assume you mean High Availability rather than Home Automation?

Currently, the software does not support that. However, the entire architecture is based on the DCE messaging "bus", where all components ("DCE devices") communicate with each other using TCP sockets irrespective of whether they are on the same box or not. So theoretically you could extend the system to spread the functions over as many boxes as you want.

Blockages as I see them: the code would need to be updated not to assume that all the core services are at 127.0.0.1/localhost/192.168.80.1; the "plugins" by definition are part of the DCERouter code space and so cannot be separated; this would really only provide load sharing rather than true HA/redundancy, extending to have multiple instances of the same "device" with failover would be a big undertaking; not every feature of LMCE is implemented inside a DCE device (eg the SQL server) and so other approaches would be needed for that; clustering of some kind would be needed to prevent the core being a single point of failure for routing between the internal and external networks.

But realistically, I'm thinking that this work has not already been considered because need for such HA in typical implementations is very low compared with the effort involved....