We have moved! This forum is now read only. (June 03)

New community website: https://community.snakeoil-os.net (June 03)

Join us in the new community by Creating a new account. (June 04)


[SOLVED] TSC on Atom CPU and downscaling CPU frequency
#16
@"frednork" ,

two quick comments.

Cyclic Test
What's your cyclictest latency numbers? Bear in mind Snakeoil uses nanoseconds (almost everybody else uses microseconds). So while it seem like your values look skyhigh, you need to divide by 1000. The reason to use nanoseconds is it's not difficult to get the latency down to 1 us with the right hardware when using Snakeoil OS. I did this with my Core2Duo a while back, and I still prefer my atom board, despite the worse latency numbers. For all intents and purposes 1 us latency vs 100 us isn't much in my point of view.

More information here. Also not sure if it's mentioned in this thread or somewhere else, the way cyclictest is running at the moment can be a bit deceptive. It is not showing you everything.

cyclicscope is a better presentation and more informative. This is something I intend to work on and hopefully get it out soon. In case you are unaware what that is, it looks something like this:
[Image: test.png]

Now the histogram is an important feature, in the above example it is telling you the latency is less than or equal to 50 us since time of measurement (2017 measurements so far). You then look at the statistics and see the latency so far is spread across 1 us to 8 us, and over 2017 measurements, the average is 2.532 us.

Now if you have a problematic hardware somewhere, you'd see spikes (in the other rows under the histogram. Each row is called a bin). And you can identify the interval of the spikes by looking at the time history box (green box). That box will tell you if the spike is regular, or random.



Timer Frequency
It's actually the other way round, lower is better.
Code:
100 Hz is a typical choice for servers, SMP and NUMA systems
with lots of processors that may show reduced performance if
too many timer interrupts are occurring.
---
250 Hz is a good compromise choice allowing server performance
while also showing good interactive responsiveness even
on SMP and NUMA systems. If you are going to be using NTSC video
or multimedia, selected 300Hz instead.
---
300 Hz is a good compromise choice allowing server performance
while also showing good interactive responsiveness even
on SMP and NUMA systems and exactly dividing by both PAL and
NTSC frame rates for video and multimedia work.
---
1000 Hz is the preferred choice for desktop systems and other
systems requiring fast interactive responses to events.

Long story short, 1000 Hz kernel is really needed when you are using the computer directly. e.g. if you are using a keyboard/mouse, using a 1000 Hz kernel will make the system appear responsive.

If you are using a kernel that's on a 100 Hz timer... If you are a fast typer, or when you use a mouse, you may notice a degree of lag on the screen. E.g. keys show up slower, mouse don't quite move the way you want it to be.

The lag is not going to be an issue in Snakeoil because it is designed to run as headless. Graphical envrionments are VNC'ed in, the computer only designed to play audio and run server like applications. As such there is no user interaction, and it doesn't need that high frequency. Why? Because audio is buffered.

So what is this 100/250/300/1000 Hz anyway? It's the number of the times the OS will 'ask around' and see if any thing require attention. e.g. with keyboards, the OS will poll the keyboard driver 1000 times a second to see if a key is pressed. If you type at over 100 words per minute, that's like 500 too 800 characters a minute, and that's can be more than 5-10 keys a second. Believe it or not, if you use a kernel that's 100 Hz, the keys will appear on the screen slower (time taken to read keyboard input, time taken to render it on screen, etc).

For audio playback, audio is buffered (placed in memory), e.g. MPD has half a second of audio buffer, and the operating system will check this half second buffer 300 times a second to see if there's any data ready to be sent to the hardware. Checking this 1000 times a second if it's ready to be sent is not going to be an improvement. If you are using a player with absolutely no buffer, then a 1000 Hz kernel is necessary.

There's also this weird issue. If your audio system has a ground loop, using a 1000 Hz kernel actually generates some weird high frequency white noise..

And that timer is just one part of the story. Snakeoil is running a Real Time kernel. That means everything is preemptable. If you set your players to run at real time, that is going to cause unnecessary issues.

Question is if tickless is better than 100 Hz? I actually did this experiment a while back. Unfortunately I cannot remember the results now as I spent too much time on coding up Snakeoil OS, and not enough time listening..

[Image: dead.gif]
Snakeoil Operating System - Music, your way!
Reply


Messages In This Thread
RE: TSC on Atom CPU and downscaling CPU frequency - by agent_kith - 17-Oct-2018, 10:17 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOLVEDSamsung NB30 Atom laptop Marvell 88E8040 NIC slavedata 5 4,301 06-Jun-2018, 05:16 AM
Last Post: slavedata
  [SOLVEDread_cfg problem when running 64 bit 0.1.4 on atom system rab 13 14,766 11-Jun-2016, 05:21 PM
Last Post: agent_kith



Users browsing this thread: 3 Guest(s)
[-]
Our Sponsors
{myadvertisements[zone_4]}

[-]
Latest Threads
Android Firefox issues with forum
Last Post: agent_kith
10-Jun-2025 04:45 PM
» Replies: 21
» Views: 2040
[split] Possible To Load Snakeoil OS in ...
Last Post: Snoopy8
09-Jun-2025 06:43 AM
» Replies: 14
» Views: 1531
Snakeoil 1.4.3 (High End U3)
Last Post: hkphantomgtr
05-Jun-2025 03:58 PM
» Replies: 67
» Views: 8979
Snakeoil with Ubuntu Desktop ?
Last Post: Snoopy8
02-Jun-2025 09:38 AM
» Replies: 8
» Views: 903
Add IR remote control using Flirc USB in...
Last Post: Snoopy8
31-May-2025 03:50 PM
» Replies: 5
» Views: 657
Work In Progress: 1.4.4
Last Post: hkphantomgtr
29-May-2025 11:44 PM
» Replies: 44
» Views: 4985
SQ difference - Raspberry Pi vs x86_64?
Last Post: Snoopy8
27-May-2025 02:16 PM
» Replies: 42
» Views: 5439
Snakeoil 1.4.0 (High End)
Last Post: aabman
25-May-2025 11:35 AM
» Replies: 93
» Views: 14906
new install issues
Last Post: carlodim
23-May-2025 09:56 AM
» Replies: 42
» Views: 4402
Is this project still alive?
Last Post: agent_kith
20-May-2025 03:11 PM
» Replies: 10
» Views: 1174

[-]
SnakeoilOS Mission Statement

Our mission is to create a free to use computer OS that is easy to install, intuitive to operate and play music that will connect and engage with you emotionally.

SnakeoilOS gives you the freedom to spend more time on listening, enjoying and exploring music. Wasting time on computers is now a thing of the past! Everything is constantly evolving/improving. Please check back often for updates.

If you like this project, do show your support with a small token donation. All donations collected will be used to run this website, and for purchasing new equipment for the project.