Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 10 of 10
  1. #1
    Junior Member
    Join Date
    Jan 2006
    Posts
    29

    dual-core CPU usage

    Hi All,
    After using slimserver on a number of low-power devices, like nslu and others, I built a server to host both the music and run slimserver among other functions.

    The specs of the server are: Core Duo 2 E6300, 2GB of memory, ~1TB of RAID5 storage. The server is also used as NAS. I have Ubuntu 7.04 Server as OS and everything works just fine.

    I use the webinterface a lot, and I like how snappy now is.
    What I noticed and my question relates to this: when slimserver scans for music or the webinterface is used extensively, it only uses one of the two CPU cores. Even if one of the cores is loaded to 100%, the other one is 99.9% idle for most of the time.

    Is this by design or something is wrong with my intallation?
    Thanks, Lleo_

  2. #2
    Senior Member
    Join Date
    Oct 2005
    Posts
    7,103
    It's certainly the case for my E6600 using Ubuntu 7.04 64-bit. I don't think perl can take advantage of dual cores.

    The only thing you can do is Server Settings - Performance - Webserver Forking:

    To avoid stalling the main process, certain web pages can be handled by a child process. This will most benefit players with small buffers such as Squeezebox1 which can experience audio dropouts while using the web interface. It will also provide smoother scrolling and IR response while accessing the web interface.
    But since the Core 2 Duos keep one core idle when scanning anyway, it will just use that core if it needs to while the other handles scanning.

    I have been able to peg both processors while FLAC encoding and doing MP3Gain analysis simultaneously. But those are two processes to begin with.
    Current: SB2, Boom (PQP3 - late beta, PQP1 - early beta), SBC (early beta), Squeezebox Radio (PB1 - early beta), Squeezebox Touch (late beta)
    Selling: Transporter
    Sold: SB3, Duet

  3. #3
    Senior Member
    Join Date
    Sep 2006
    Posts
    425
    Using 100% on one core really doesn't matter anyway, you still have the other core free for windows (my htpc is a dual core too, slimserver installed)

  4. #4
    Junior Member
    Join Date
    Jan 2006
    Posts
    29
    Thanks Mark, this helps!
    I have had the forking enabled and also raised the process priority to the highest available to see if that makes a difference.

    Now, that I gave some thinking, actually I am realizing that I need to start two copies of prime95 or cpu-burn to load both cores when testing, so maybe it is by system-design that a single process can not use two cores, even when multi-threaded.
    (not sure if prime95 or cpu-burn are multithreaded though)

    but, in slimserver properties, perl and mysqld (I think) are listed wih multi-threading supported, which in turn makes me to expect that they could use two cores if available.

  5. #5
    Senior Member
    Join Date
    Oct 2005
    Posts
    7,103
    Quote Originally Posted by Lleo_ View Post
    Now, that I gave some thinking, actually I am realizing that I need to start two copies of prime95 or cpu-burn to load both cores when testing, so maybe it is by system-design that a single process can not use two cores, even when multi-threaded.
    (not sure if prime95 or cpu-burn are multithreaded though)
    If you looked at processor load, you'll see that there's some management going on at the processor level outside of the application and the OS - usually it's the same core that runs the GUI and sits ready for the user while the other core handles the heavy work. Sometimes they switch back and forth, but always maintaining 50% processor free. Neat.

    but, in slimserver properties, perl and mysqld (I think) are listed wih multi-threading supported, which in turn makes me to expect that they could use two cores if available.
    Scanning is just one process though? Are you saying perl and MySQL should allow full use of both cores?

    Even if it didn't, it's not like these processors are slow by any means. Encoding a track to FLAC at -8 compression and then LAME encoding concurrently take 30 seconds per track!
    Current: SB2, Boom (PQP3 - late beta, PQP1 - early beta), SBC (early beta), Squeezebox Radio (PB1 - early beta), Squeezebox Touch (late beta)
    Selling: Transporter
    Sold: SB3, Duet

  6. #6
    Junior Member
    Join Date
    Jan 2006
    Posts
    29
    I am not very good at quoting previous posts :-)
    and no, I definiately do not want slimserver to load 99.9% of both cores and then the OS struggle to get some processing power.
    I just asked this from the perspective if it was by design to always use ~50% of the available precessing capacity.

    Multithreading in the scanning process is most likely is used, i.e. scanning more than one audio file at the same time. The scanning itself is indeed only one process but I think the number of threads are not directly adjustable, unless one digs deep in the code maybe... but I am no expert...

    overall, I certainly like the responsiveness and speed of SS on a C2D processor, this is by far exceeds the experience compared to NSLU2, AMD K5 450Mhz, Celeron 900 Mhz I previously used.

  7. #7
    Former Squeezebox Guy andyg's Avatar
    Join Date
    Jan 2006
    Location
    Pittsburgh, PA
    Posts
    7,396
    SlimServer does not use threads in any way. The only time you'll see the second core/CPU being used is when other processes are running, such as the scanner, or transcoders like LAME or FLAC.

  8. #8
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,454

    dual-core CPU usage

    > SlimServer does not use threads in any way. The only time you'll see
    > the second core/CPU being used is when other processes are running,
    > such as the scanner, or transcoders like LAME or FLAC.


    Or MySQL running on the second core?

    --

    Michael

    -----------------------------------------------------------------
    http://www.herger.net/SlimCD - your SlimServer on a CD
    http://www.herger.net/slim - AlbumReview, Biography, MusicInfoSCR


  9. #9
    Former Squeezebox Guy andyg's Avatar
    Join Date
    Jan 2006
    Location
    Pittsburgh, PA
    Posts
    7,396
    Yes, I forgot about MySQL. It's multi-threaded so will be able to use both cores as needed.

  10. #10
    Junior Member
    Join Date
    Jan 2006
    Posts
    29
    I guess this clarifies it. Thanks all for your answers.
    Happy listening! Lleo_

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •