Thread: [Fremantle Maemo5] Tox for N900
View Single Post
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#21
Doesn't look good

Code:
Mem: 216116K used, 19136K free, 0K shrd, 1812K buff, 56808K cached
CPU:  8.6% usr  6.3% sys  0.0% nice 84.7% idle  0.0% io  0.0% irq  0.3% softirq
Load average: 1.15 0.41 0.19
  PID  PPID USER     STAT   RSS %MEM %CPU COMMAND
18812 18621 root     S     2312  0.9  3.9 ./nTox 192.81.133.111 33445 8CD5A9BF0A6CE358BA36F7A653F99FA6B258FF756E490F52C1F98CC420F78858 
   10     2 root     SW       0  0.0  2.4 [omap2_mcspi]
  564     2 root     SW       0  0.0  1.5 [wl12xx]
16383  1296 user     S    12584  5.3  1.1 /usr/bin/osso-addressbook                                                  
18844 18839 root     R      740  0.3  1.1 top 
powertop confirms it:

Code:
~/tox # powertop
Powertop 1.13.3
status: Unknown job: pmtrackerdaemon
Sleeping for 11 seconds before sampling
Collecting data for 30 seconds
Sample interval was 00m 30s 20996us

C#      | Ratio  | Avg/dura | Frequency | Ratio
--------+--------+----------+-----------+--------+
     C0 |  23.7% |          |  1150 MHz |   nan% |
     C1 |   0.2% |    0.8ms | 
     C2 |  42.4% |    8.0ms | 
     C3 |  33.7% |   39.8ms | 
     C4 |   0.0% |    7.4ms | 

IRQ#    | Activity   | Type           | Name
--------+------------+----------------+---------------------------
     12 |       8044 |           INTC | DMA
     37 |       1894 |           INTC | gp
     11 |       1324 |           INTC | prcm
    202 |        585 |           GPIO | wl1251
     56 |        400 |           INTC | i2c_omap
     86 |        332 |           INTC | mmc1
     83 |         53 |           INTC | mmc0
     57 |         39 |           INTC | i2c_omap
    225 |          4 |           GPIO | omap2-onenand

PID#    | Activity   | Name           | Function Entry (Expire)
--------+------------+----------------+---------------------------
      0 |       1120 |  <kernel core> | tick_nohz_restart_sched_tick (tick_sched_timer)
  18812 |        549 |           nTox | schedule_hrtimeout_range (hrtimer_wakeup)
    564 |        218 |         wl12xx | schedule_timeout (process_timeout)
      0 |        207 |  <kernel core> | hrtimer_start (tick_sched_timer)
    564 |        184 |         wl12xx | queue_delayed_work (delayed_work_timer_fn)
     38 |         98D|            awk | cpufreq_governor_dbs (delayed_work_timer_fn)
   1502 |         91 |       wlancond | ieee80211_ioctl_siwpower (ieee80211_dynamic_ps_timer)
    564 |         63 |         wl12xx | schedule_timeout (process_timeout)
     10 |         32 |    omap2_mcspi | sk_reset_timer (tcp_delack_timer)
    597 |         13 |          mmcqd | queue_delayed_work (delayed_work_timer_fn)
     10 |          9 |    omap2_mcspi | neigh_add_timer (neigh_timer_handler)
    597 |          8 |          mmcqd | schedule_timeout (process_timeout)
    723 |          7 |           dsme | __enqueue_rt_entity (sched_rt_period_timer)
    935 |          6 |      bme_RX-51 | sys_timer_settime (posix_timer_fn)
    580 |          5 |          mmcqd | queue_delayed_work (delayed_work_timer_fn)
   8506 |          4 |        pdflush | ubifs_wbuf_write_nolock (wbuf_timer_callback_nolock)
      1 |          3D|  <kernel core> | queue_delayed_work (delayed_work_timer_fn)
     30 |          3 |          mount | setup_wb_timer (wb_timer_fn)
   1816 |          3 |         modest | sk_reset_timer (tcp_write_timer)
   1818 |          3 |         modest | sk_reset_timer (tcp_write_timer)
    580 |          3 |          mmcqd | schedule_timeout (process_timeout)
    935 |          2 |      bme_RX-51 | sys_timer_settime (posix_timer_fn)
    935 |          2 |      bme_RX-51 | do_nanosleep (hrtimer_wakeup)
    935 |          2 |      bme_RX-51 | schedule_timeout (process_timeout)
    761 |          2D|<kernel module> | queue_delayed_work (delayed_work_timer_fn)
    723 |          2 |           dsme | do_nanosleep (hrtimer_wakeup)
  18262 |          2 |telepathy-gabbl | sk_reset_timer (tcp_write_timer)
   1820 |          2 |         modest | sk_reset_timer (tcp_write_timer)
   1820 |          2 |         modest | journal_get_write_access (commit_timeout)
   1799 |          2 |         modest | schedule_hrtimeout_range (hrtimer_wakeup)
    580 |          2 |          mmcqd | schedule_timeout (process_timeout)
  18812 |          2 |           nTox | sk_reset_timer (tcp_write_timer)
  18821 |          1 |           sshd | sk_reset_timer (tcp_write_timer)
    985 |          1 |           hald | schedule_hrtimeout_range (hrtimer_wakeup)
      1 |          1 |  <kernel core> | inet_initpeers (peer_check_expire)
  14960 |          1 |         mebook | schedule_hrtimeout_range (hrtimer_wakeup)
      0 |          1 |  <kernel core> | queue_delayed_work (delayed_work_timer_fn)
   1818 |          1 |         modest | schedule_timeout (process_timeout)
     10 |          1 |    omap2_mcspi | fib6_add (fib6_gc_timer_cb)
   1816 |          1 |         modest | schedule_timeout (process_timeout)
   1424 |          1 |hildon-status-m | schedule_hrtimeout_range (hrtimer_wakeup)
    738 |          1 |        syslogd | hrtimer_start (it_real_fn)
   1816 |          1 |         modest | journal_get_write_access (commit_timeout)
   8506 |          1 |        pdflush | journal_get_write_access (commit_timeout)
    500 |          1 |          kmmcd | schedule_timeout (process_timeout)
  18824 |          1 |       powertop | do_nanosleep (hrtimer_wakeup)

Power domain activity breakdown
Domain  | % of time spent in states
--------+---------+---------+---------+---------+----------
usbhost |OFF: 100%|RET:   0%|INA:   0%| ON:   0%| now:(OFF)
    sgx |OFF: 100%|RET:   0%|INA:   0%| ON:   0%| now:(OFF)
    per |OFF:  32%|RET:  42%|INA:   0%| ON:  24%| now:(ON)
    dss |OFF: 100%|RET:   0%|INA:   0%| ON:   0%| now:(OFF)
    cam |OFF: 100%|RET:   0%|INA:   0%| ON:   0%| now:(OFF)
   core |OFF:   0%|RET:  32%|INA:  31%| ON:  36%| now:(ON)
   neon |OFF:   0%|RET:  33%|INA:  41%| ON:  24%| now:(ON)
    mpu |OFF:   0%|RET:  33%|INA:  41%| ON:  24%| now:(ON)
   iva2 |OFF: 100%|RET:   0%|INA:   0%| ON:   0%| now:(OFF)

Clock activity breakdown at end of period
Domain  | Active clocks
--------+---------------+---------------+------------------
   core |          SDRC | HSOTGUSB_IDLE |      OMAPCTRL 
        |     MAILBOXES |
   wkup |          GPT1 |       32KSYNC |         GPIO1 
        |          WDT1 |           SR1 |           SR2 
        |
  ckgen |          CORE |          PERI |           96M 
        |           48M |           12M |           54M 
        |      EMU_CORE |
    per |         GPIO2 |         GPIO3 |         GPIO4 
        |         GPIO5 |         GPIO6 |

Total wakeups  15340, 511.3/s | IRQ 12675, 422.5/s | Timers 2665,  88.8/s
HW wakeups       44,   1.5/s |     Real gp_timers expired  102,   3.4/s
Now, it might be that nTox is badly written, but on my desktop PC uTox shows similar CPU usage

Code:
top - 10:51:47 up 5 days,  3:37,  7 users,  load average: 0,15, 0,13, 0,21
Tasks: 239 total,   3 running, 236 sleeping,   0 stopped,   0 zombie
%Cpu(s):  2,3 us,  1,3 sy,  0,0 ni, 96,1 id,  0,2 wa,  0,0 hi,  0,1 si,  0,0 st
KiB Mem:  16388860 total,  5986692 used, 10402168 free,   852760 buffers
KiB Swap: 16467964 total,        0 used, 16467964 free.  3073580 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND     
 3012 ivo        9 -11  523296  15972  13004 S   6,6  0,1 302:11.32 pulseaudio  
22516 ivo       20   0  775072  14896   8980 S   4,6  0,1   1:01.81 utox        
 8743 ivo       20   0  513416  53060  25736 S   1,3  0,3   0:50.90 plugin-con+ 
24380 ivo       20   0 1436516 437112  56372 S   1,3  2,7   6:42.79 firefox     
It seems nTox simply does while(1) loop with tox_do calls every n msecs(simplified), so a better structured code that uses what is explained on https://libtoxcore.so/getting_starte...to-come-to-you might be more efficient. I might look into hacking nTox to work like that.

Find here binaries compiled for N900 if you want to play with it.
__________________
Never fear. I is here.

720p video support on N900,SmartReflex on N900,Keyboard and mouse support on N900
Nothing is impossible - Stable thumb2 on n900

Community SSU developer
kernel-power developer and maintainer

 

The Following 8 Users Say Thank You to freemangordon For This Useful Post: