Skip to main content.

Comparing Performance 100 Hz versus 1000 Hz Clock Tick

It is perspicuous that a system running with a clock tick of 1000 Hz suffers from a higher system overhead than one running with a 100 Hz tick: all clock tick related activities must run ten times as often.

But how big is the impact on system performance really?

Theoretical Expectations

On a MPC860-T at 50 MHz the overhead to handle a trivial interrupt in Linux is approx. 50 microseconds.

If the clock tick happens 100 Times per second, this is 50 * 100 us or 5 milliseconds or 0.5% of the total available peformance.

With a clock tick of 1 kHz we have 50 * 1000 us = 50 milliseconds or 5% of the total available peformance.

Which means that the increase of the clock tick alone should result in a performance drop of approximately 4.5%.

ALERT! Note: assume you run exactly the same code on a 400 MHz processor; here the interrupt processing time will be approx. 10 us. This means an overhead of 1 ms or 0.1% at a tick of 100 Hz and ome of 10ms or 1% at 1kHz - which means that the impact of the increased clock tick is just 0.9%!

Benchmark Results

Here is the results of running the lmbench benchmark on a TQM860L board (MPC860-T processor at 50 MHz, 16 MB SDRAM, 4 GB ATA disk on the PCMCIA controller). 5 test runs were made each with a clock tick of 100 Hz (system name "tqm860l") and with a tick of 1000 Hz (system name "tqm880l1k"):

                 L M B E N C H  3 . 0   S U M M A R Y
                 ------------------------------------
                 (Alpha software, do not distribute)

Basic system parameters
------------------------------------------------------------------------------
Host                 OS Description              Mhz  tlb  cache  mem   scal
                                                     pages line   par   load
                                                           bytes  
--------- ------------- ----------------------- ---- ----- ----- ------ ----
tqm860l   Linux 2.4.25-       powerpc-linux-gnu   50    32    16 1.0100    1
tqm860l   Linux 2.4.25-       powerpc-linux-gnu   50    32    16 1.0200    1
tqm860l   Linux 2.4.25-       powerpc-linux-gnu   50    32    16 1.0200    1
tqm860l   Linux 2.4.25-       powerpc-linux-gnu   50    32    16 1.0200    1
tqm860l   Linux 2.4.25-       powerpc-linux-gnu   50    32    16 1.0100    1
============================================================================
tqm860l Tick  100 Avrg:                           50    32    16 1.0200    1
============================================================================
tqm860l1k Linux 2.4.25-       powerpc-linux-gnu   50    32    16 1.0100    1
tqm860l1k Linux 2.4.25-       powerpc-linux-gnu   50    32    16 1.0100    1
tqm860l1k Linux 2.4.25-       powerpc-linux-gnu   50    32    16 1.0000    1
tqm860l1k Linux 2.4.25-       powerpc-linux-gnu   50    32    16 1.0000    1
tqm860l1k Linux 2.4.25-       powerpc-linux-gnu   50    32    16 1.0200    1
============================================================================
tqm860l Tick 1000 Avrg:                           50    32    16 1.0100    1
                                                 +-0   +-0   +-0 -1.0    +-0 %
============================================================================
Processor, Processes - times in microseconds - smaller is better
------------------------------------------------------------------------------
Host                 OS  Mhz null null      open slct sig  sig  fork exec sh  
                             call  I/O stat clos TCP  inst hndl proc proc proc
--------- ------------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
tqm860l   Linux 2.4.25-   50 6.19 10.4 79.9 154. 490. 23.8 71.5 6930 30.K 105K
tqm860l   Linux 2.4.25-   50 6.20 10.4 80.4 155. 510. 23.9 70.8 6904 30.K 105K
tqm860l   Linux 2.4.25-   50 6.20 10.4 77.9 154. 489. 24.0 70.5 6928 30.K 105K
tqm860l   Linux 2.4.25-   50 6.20 10.4 79.8 153. 507. 23.9 69.1 6956 30.K 105K
tqm860l   Linux 2.4.25-   50 6.20 10.6 79.7 153. 485. 23.9 69.6 6893 31.K 106K
============================================================================
tqm860l Tick  100 Avrg:   50 6.20 10.4 79.6 154  496  23.9 70.3 6922 30 K 105K
============================================================================
tqm860l1k Linux 2.4.25-   50 5.83 10.8 86.2 128. 512. 24.5 71.1 7230 32.K 111K
tqm860l1k Linux 2.4.25-   50 5.82 11.0 85.3 163. 507. 24.6 70.5 7188 32.K 111K
tqm860l1k Linux 2.4.25-   50 5.83 10.8 89.5 166. 547. 24.5 70.6 7258 32.K 111K
tqm860l1k Linux 2.4.25-   50 5.83 10.7 84.8 164. 507. 24.5 71.0 7243 32.K 111K
tqm860l1k Linux 2.4.25-   50 5.81 10.8 84.1 161. 511. 24.5 70.7 7232 32.K 111K
============================================================================
tqm860l Tick 1000 Avrg:   50 5.82 10.8 86.0 156  517  24.5 70.8 7230 32 K 111K
                         +-0 -6.1 +3.9 +8.0 +1.3 +4.2 +2.5 +0.7 +4.5 +6.7 +5.7 %
============================================================================
Basic integer operations - times in nanoseconds - smaller is better
-------------------------------------------------------------------
Host                 OS  intgr intgr  intgr  intgr  intgr  
                          bit   add    mul    div    mod   
--------- ------------- ------ ------ ------ ------ ------ 
tqm860l   Linux 2.4.25-   20.6   20.5   42.3  161.0  260.4
tqm860l   Linux 2.4.25-   20.6   20.5   42.3  161.0  260.5
tqm860l   Linux 2.4.25-   20.6   20.4   42.4  161.0  260.6
tqm860l   Linux 2.4.25-   20.6   20.4   42.0  161.0  260.6
tqm860l   Linux 2.4.25-   20.6   20.5   42.3  161.0  260.4
============================================================================
tqm860l Tick  100 Avrg:   20.6   20.4   42.3  161.0  260.5
============================================================================
tqm860l1k Linux 2.4.25-   21.2   21.0   42.7  164.6  268.6
tqm860l1k Linux 2.4.25-   21.2   21.0   42.7  163.9  268.6
tqm860l1k Linux 2.4.25-   21.1   21.0   42.7  163.9  268.6
tqm860l1k Linux 2.4.25-   21.0   21.0   42.7  163.9  270.2
tqm860l1k Linux 2.4.25-   21.2   21.0   42.7  164.6  268.6
============================================================================
tqm860l Tick 1000 Avrg:   21.1   21.0   42.7  164.2  268.9
                          +2.4   +2.9   +1.0  +2.0   +3.2 %
============================================================================
Basic float operations - times in nanoseconds - smaller is better
-----------------------------------------------------------------
Host                 OS  float  float  float  float
                         add    mul    div    bogo
--------- ------------- ------ ------ ------ ------ 
tqm860l   Linux 2.4.25- 4490.9 4114.0 8295.0  22.0K
tqm860l   Linux 2.4.25- 4490.9 4114.7 8295.0  22.0K
tqm860l   Linux 2.4.25- 4490.9 4114.0 8295.0  22.0K
tqm860l   Linux 2.4.25- 4490.9 4114.0 8295.0  22.0K
tqm860l   Linux 2.4.25- 4490.9 4114.0 8271.4  22.0K
============================================================================
tqm860l Tick  100 Avrg: 4490.9 4114.1 8290.3  22.0K
============================================================================
tqm860l1k Linux 2.4.25- 4609.3 4235.6 8696.7  22.8K
tqm860l1k Linux 2.4.25- 4610.1 4235.6 8646.7  22.8K
tqm860l1k Linux 2.4.25- 4636.4 4234.9 8648.3  22.8K
tqm860l1k Linux 2.4.25- 4610.1 4235.6 8700.0  22.8K
tqm860l1k Linux 2.4.25- 4627.1 4242.2 8645.0  22.8K
============================================================================
tqm860l Tick 1000 Avrg: 4618.6 4236.8 8667.3  22.8K
                        +2.8   +3.0   +4.6    +3.6 %
============================================================================
Basic double operations - times in nanoseconds - smaller is better
------------------------------------------------------------------
Host                 OS  double double double double
                         add    mul    div    bogo
--------- ------------- ------  ------ ------ ------ 
tqm860l   Linux 2.4.25- 6372.7 8488.2  33.5K  54.8K
tqm860l   Linux 2.4.25- 6373.9 8429.7  33.5K  54.5K
tqm860l   Linux 2.4.25- 6373.9 8488.2  33.5K  54.5K
tqm860l   Linux 2.4.25- 6373.9 8488.2  33.5K  54.8K
tqm860l   Linux 2.4.25- 6373.9 8420.6  33.5K  54.4K
============================================================================
tqm860l Tick  100 Avrg: 6373.7 8463.0  33.5K  54.6K
============================================================================
tqm860l1k Linux 2.4.25- 6563.4 8812.5  34.5K  57.2K
tqm860l1k Linux 2.4.25- 6600.2 8812.5  34.5K  57.2K
tqm860l1k Linux 2.4.25- 6597.9 8814.1  34.5K  57.3K
tqm860l1k Linux 2.4.25- 6604.1 8810.9  34.5K  57.2K
tqm860l1k Linux 2.4.25- 6565.8 8810.9  34.5K  57.2K
============================================================================
tqm860l Tick 1000 Avrg: 6586.3 8812.2  34.5K  57.2K
                        +3.3   +4.1    +3.0   +4.8 %
============================================================================
Context switching - times in microseconds - smaller is better
-------------------------------------------------------------------------
Host                 OS  2p/0K 2p/16K 2p/64K 8p/16K 8p/64K 16p/16K 16p/64K
                         ctxsw  ctxsw  ctxsw ctxsw  ctxsw   ctxsw   ctxsw
--------- ------------- ------ ------ ------ ------ ------ ------- -------
tqm860l   Linux 2.4.25-   34.8   66.0   62.8   81.3   77.4    81.7    78.6
tqm860l   Linux 2.4.25-   23.2   62.5   78.0   82.2   82.1    83.3    80.6
tqm860l   Linux 2.4.25-   30.1   72.9   74.0   89.0   76.6    82.5    80.4
tqm860l   Linux 2.4.25-   25.9   73.2   66.8   88.7   80.9    88.1    85.4
tqm860l   Linux 2.4.25-   32.6   59.5   76.8   77.4   85.5    81.3    86.6
============================================================================
tqm860l Tick  100 Avrg:   29.3   66.8   71.7   83.7   80.5    83.4    82.3
============================================================================
tqm860l1k Linux 2.4.25-   23.4   62.3   57.8   88.3   73.1    93.6    78.1
tqm860l1k Linux 2.4.25-   25.0   61.1   53.2   91.0   70.8    90.2    76.6
tqm860l1k Linux 2.4.25-   23.2   64.4   55.8   87.3   76.1    87.0    76.4
tqm860l1k Linux 2.4.25-   24.8   65.9   55.2   84.9   72.9    93.0    77.3
tqm860l1k Linux 2.4.25-   23.3   65.2   55.8   87.9   76.5    90.1    77.4
============================================================================
tqm860l Tick 1000 Avrg:   23.9   63.8   55.6   87.9   73.9    90.8    77.2
                         -18.4   -4.5  -22.4   +5.0   -8.2    +8.9    -6.2 %
============================================================================
*Local* Communication latencies in microseconds - smaller is better
---------------------------------------------------------------------
Host                 OS 2p/0K  Pipe AF     UDP  RPC/   TCP  RPC/ TCP
                        ctxsw       UNIX         UDP         TCP conn
--------- ------------- ----- ----- ---- ----- ----- ----- ----- ----
tqm860l   Linux 2.4.25-  34.8 143.2 361. 694.2 1430. 998.5 1922. 2941
tqm860l   Linux 2.4.25-  23.2 148.7 340. 731.9 1430. 998.2 1917. 2975
tqm860l   Linux 2.4.25-  30.1 152.6 350. 723.4 1446. 998.5 1906. 2984
tqm860l   Linux 2.4.25-  25.9 145.9 343. 694.5 1428. 995.2 1940. 2963
tqm860l   Linux 2.4.25-  32.6 142.2 344. 721.3 1434. 997.3 1904. 2987
============================================================================
tqm860l Tick  100 Avrg:  29.3 146.5 348  713.1 1434. 997.5 1918. 2970
============================================================================
tqm860l1k Linux 2.4.25-  23.4 143.4 374. 712.2 1500. 1040. 2002. 3121
tqm860l1k Linux 2.4.25-  25.0 148.1 354. 729.3 1500. 1031. 2006. 3114
tqm860l1k Linux 2.4.25-  23.2 147.2 358. 730.5 1502. 1028. 2002. 3124
tqm860l1k Linux 2.4.25-  24.8 142.4 355. 724.1 1504. 1017. 2000. 3126
tqm860l1k Linux 2.4.25-  23.3 150.6 363. 712.6 1498. 1034. 2000. 3144
============================================================================
tqm860l Tick 1000 Avrg:  23.9 146.3 361. 721.8 1501. 1030. 2002. 3126
                        -18.4 -0.1  +3.7 +1.2  +4.7  +3.3  +4.4  +5.3 %
============================================================================
File & VM system latencies in microseconds - smaller is better
-------------------------------------------------------------------------------
Host                 OS   0K File      10K File     Mmap    Prot   Page   100fd
                        Create Delete Create Delete Latency Fault  Fault  selct
--------- ------------- ------ ------ ------ ------ ------- ----- ------- -----
tqm860l   Linux 2.4.25-  708.7  711.7 3164.6 1251.6  2029.0  20.2    40.1 293.4
tqm860l   Linux 2.4.25-  715.8  728.9 3205.1 1257.9  2029.0  15.9    40.1 311.9
tqm860l   Linux 2.4.25-  714.3  723.6 3194.9 1265.8  2041.0  16.5    40.1 293.4
tqm860l   Linux 2.4.25-  709.7  713.8 3164.6 1251.6  2070.0  18.2    40.7 293.3
tqm860l   Linux 2.4.25-  717.4  740.7 3164.6 1259.4  2050.0  18.8    40.1 290.2
============================================================================
tqm860l Tick  100 Avrg:  713.2  723.7 3178.8 1257.3  2043.8  17.9    40.2 296.4
============================================================================
tqm860l1k Linux 2.4.25-  777.0  788.0 3424.7 1351.4  2126.0  18.9    42.4 304.9
tqm860l1k Linux 2.4.25-  781.2  783.7 3436.4 1355.0  2158.0  20.9    42.4 305.0
tqm860l1k Linux 2.4.25-  784.9  791.1 3448.3 1360.5  2160.0  20.1    43.0 303.1
tqm860l1k Linux 2.4.25-  781.2  788.0 3436.4 1360.5  2136.0  20.1    42.6 302.9
tqm860l1k Linux 2.4.25-  777.6  785.5 3460.2 1345.9  2173.0  20.1    43.1 304.2
============================================================================
tqm860l Tick 1000 Avrg:  780.4  787.3 3441.2 1354.7  2150.6  20.0    42.7 304.0
                         +9.4   +8.8  +8.2   +7.8    +5.2    +11.7   +6.2 +2.6 %
============================================================================
*Local* Communication bandwidths in MB/s - bigger is better
-----------------------------------------------------------------------------
Host                OS  Pipe AF    TCP  File   Mmap  Bcopy  Bcopy  Mem   Mem
                             UNIX      reread reread (libc) (hand) read write
--------- ------------- ---- ---- ---- ------ ------ ------ ------ ---- -----
tqm860l   Linux 2.4.25- 9.82 10.4 8.12   15.3   43.0   26.2   26.7 43.1  43.2
tqm860l   Linux 2.4.25- 9.83 10.4 8.13   15.3   43.0   26.2   26.7 43.1  43.2
tqm860l   Linux 2.4.25- 9.82 10.4 8.13   15.3   43.0   26.2   26.7 43.1  43.2
tqm860l   Linux 2.4.25- 9.82 10.4 8.11   15.3   43.0   26.2   26.7 43.1  43.2
tqm860l   Linux 2.4.25- 9.82 10.4 8.12   15.3   43.0   26.2   26.7 43.1  43.1
============================================================================
tqm860l Tick  100 Avrg: 9.82 10.4 8.12   15.3   43.0   26.2   26.7 43.1  43.2
============================================================================
tqm860l1k Linux 2.4.25- 9.35 9.87 7.69   14.6   41.2   25.1   25.1 41.4  41.2
tqm860l1k Linux 2.4.25- 9.35 9.84 7.70   14.6   41.2   25.1   25.1 41.4  41.2
tqm860l1k Linux 2.4.25- 9.35 9.84 7.68   14.6   41.2   25.1   25.1 41.4  41.2
tqm860l1k Linux 2.4.25- 9.35 9.82 7.69   14.6   41.2   25.1   25.1 41.4  41.2
tqm860l1k Linux 2.4.25- 9.32 9.82 7.68   14.6   41.2   25.1   25.1 41.4  41.2
============================================================================
tqm860l Tick 1000 Avrg: 9.34 9.84 7.67   14.6   41.2   25.1   25.1 41.4  41.2
                        -4.9 -5.4 -5.5   -4.6   -4.2   -4.2   -6.0 -3.9  -4.6 %
============================================================================
Memory latencies in nanoseconds - smaller is better
    (WARNING - may not be correct, check graphs)
------------------------------------------------------------------------------
Host                 OS   Mhz   L1 $   L2 $    Main mem    Rand mem    Guesses
--------- -------------   ---   ----   ----    --------    --------    -------
tqm860l   Linux 2.4.25-    50   42.4  183.2  235.1      1372.2
tqm860l   Linux 2.4.25-    50   42.3  183.3  235.1      1371.4
tqm860l   Linux 2.4.25-    50   42.3  183.3  235.1      1368.1
tqm860l   Linux 2.4.25-    50   42.3  183.2  235.1      1371.3
tqm860l   Linux 2.4.25-    50   42.4  183.3  235.1      1370.5
============================================================================
tqm860l Tick  100 Avrg:    50   42.3  183.3  235.1      1370.7
============================================================================
tqm860l1k Linux 2.4.25-    50   43.2  200.2  243.5      1441.7    No L2 cache?
tqm860l1k Linux 2.4.25-    50   43.2  200.1  243.6      1441.1    No L2 cache?
tqm860l1k Linux 2.4.25-    50   43.2  200.2  243.6      1442.1    No L2 cache?
tqm860l1k Linux 2.4.25-    50   43.2  200.1  243.6      1442.3    No L2 cache?
tqm860l1k Linux 2.4.25-    50   43.2  200.2  243.6      1443.6    No L2 cache?
============================================================================
tqm860l Tick 1000 Avrg:    50   43.2  200.2  243.6      1442.2
                          +-0   +2.1  +9.2   +3.6       +5.2 %
============================================================================

Interpretation of the Results

Plain CPU performance related tests ("Basic integer operations", "Basic float operations" resp. "Basic double operations") run approx. 4% slower, which is a goot match with our expectations.

For other tests it is more difficult to interpret the results; for example it is not immediately clear how much influence goes back to the fact that the time measurement happens at 10 times better accuracy at the higher clock, so rounding / cutoff errors may cause a shift of the results.

Most tests show a performance degradadion of 5...6%, in some cases near 10%.

Especially big differences can be seen with the context switching tests - in some cases the 1 kHz system is nearly 20% faster, in other cases it is 10% slower. Here it is impossible to come up with clean statements about the effect that can be expected for real life applications.

Summary

The measurents are consistent with the theoretic expectations. The increased clock tick alone contributes to the performance degradation by about 5% on low end systems.

On systems with higher performance the effect is much less significant.

This probably explains why many developers who never use low-end embedded processors don't care about (and usually don't even know of) these problems in the 2.6 kernel.

-- WolfgangDenk - 06 Jul 2005


WebForm
TopicClassification: PublicSupported
OperatingSystem: OsLinux
OsVersion:  

Attachment sort Action Size Date Who Comment
lmbench-results.tar.gz manage 208.2 K 04 Jul 2005 - 21:57 WolfgangDenk lmbench result raw data