About Raspberry Pi2 Optimized kernel
guestXubuntu
Status: New User - Welcome
Joined: 08 Apr 2013
Posts: 3
Reply Quote
Firstly, I cant use enough English language. My writings can be wrong grammar.

I'm raspberry pi 2 user. I'm compiling kernels. I'm trying different configs. I can get better gui response.

Raspberry needs kernel optimization more than powerful x86 computers.Pi's advantage is single configuration. There is only one Pi2.

I'm used BFS cpu scheduler. I'm used BFQ io scheduler. My GUI response better than stock kernel. My kernel better for destkop but i cant get stock kernel scores for lots of cpu benchmark.

I'm tried get support for kernel optimization from official raspberry forum. But they are not totaly focused this.

elinux.org/index.php?title=Raspberry_Pi_Kernel_Compilation&redirect=no

I'm used this info for compiling kernel 3.19.y.
I'm used gcc 4.8.4.

I need advices.
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1122
Reply Quote
The only tips I can provide are to point out the limitations of the slower CPU on the Raspberry Pi series.

Because they have smaller cache sizes, they are more sensitive to context switching. On a faster x86_64 cpu with 8mb of L2 cache, you can context switch more often and tolerate the higher number of cache misses with little to unmeasurable performance loss. However, on an ARM cpu, like the one on the Raspberry Pi series, doubling the rate of context switching is easy measure through benchmarking.

Here's an example I played with on my Nexus One. The Nexus One has a 1ghz Qualcomm Scorpion with 256kb of L2 cache. When running a GBA emulator to play Sonic Advance, without adjusting any settings on a BFS kernel, you a solid 60 FPS. However, as you drop the rr_interval (round robin interval) from 6ms down to 3ms, you drop frames and get about 30 fps.

What happened here? The cost of context switching on the kernel every 3ms literally dropped the performance of the GBA emulator about 25-50%! On a modern Intel Core i3-i7 desktop CPU, dropping the rr_interval from 6ms to 3ms does not impact throughput on most benchmarks in any measurable way.

So my suggestion, play around with frequencies and discover the optimal latency to throughput ratio for your device. This will require many hours or days of testing to find the goldilocks zone on your Raspberry Pi (about 5% kernel overhead, 95% raw CPU user time), but you can share what you learn with everyone else.
Back to top
guestXubuntu
Status: New User - Welcome
Joined: 08 Apr 2013
Posts: 3
Reply Quote
Thanks for advice.

I'm get better benchmark scores ( display output related or cpu related ) for between 125 - 200 rr_interval setting.

My kernel freq. 100 hz. It's default raspberry kernel setting. I'm learned default rr interval setting of bfs scheduler is otimized for 1000 hz. ( I'm not know information is truth )

I need real time benchmark. I can start one terminal window for endless loop like benchmark. I can start terminal window for change rr_interval.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours