[Bug 694405] souphttpsrc efficiency is too low

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Feb 26 01:48:31 PST 2013


https://bugzilla.gnome.org/show_bug.cgi?id=694405
  GStreamer | gst-plugins-good | 0.11.x

--- Comment #7 from zhangyanping <zhangyanping210 at yahoo.com.cn> 2013-02-26 09:48:23 UTC ---
Hello everyone,

        I test in 1.0.5, the result is the same.

       The blocksize of souphttpsrc is default 4096Byte. The min memory page of
my device is also 4096. So I don't think there are any memory unaligned
problem.

       And I add logs to print how much time that gst_soup_http_src_create
cost.

      When pipeline stable running, 420 times "gst_soup_http_src_create" was
called in one second. 

     420*4096*8/1024/1024=13.125Mbps

    So the bitrate is 13.125Mbps. 

    And in the 420 times, 355 times spent 0 ms, and the rest 65 times spend
10ms at every calling. So 10ms*65=650ms. I think this is what cost the cpu.

    I use gdb to trace it. This is the call stack.

=====================================
#0  read_from_network (sock=0x106248, buffer=0x22668, len=999104,
nread=0xf3ec0, cancellable=0x102b80, error=0x2be91a78)
    at soup-socket.c:1371
#1  0x2b17fb04 in soup_socket_read (sock=0xf3ec0, buffer=0x110a00, len=4096,
nread=0x2be91a7c, cancellable=0x102b80, 
    error=0x2be91a78) at soup-socket.c:1456
#2  0x2b1648b4 in read_body_chunk (msg=0x22668) at soup-message-io.c:492
#3  0x2b165c54 in io_read (sock=0xf3ec0, msg=0x22668) at soup-message-io.c:989
#4  0x2b166610 in io_unpause_internal (msg=0x22668) at soup-message-io.c:1214
#5  0x2ac6da10 in g_idle_dispatch () from /app/qtBrowser/lib/libglib-2.0.so.0
#6  0x2ac6ea78 in g_main_context_dispatch () from
/app/qtBrowser/lib/libglib-2.0.so.0
#7  0x2ac70784 in g_main_context_iterate () from
/app/qtBrowser/lib/libglib-2.0.so.0
#8  0x2ac70a20 in g_main_loop_run () from /app/qtBrowser/lib/libglib-2.0.so.0
#9  0x2b04f930 in gst_soup_http_src_create (psrc=0xf40e0, outbuf=0x2be91c98) at
gstsouphttpsrc.c:1291
#10 0x2b0fd22c in gst_push_src_create (bsrc=0xf40e0, offset=13630, length=4096,
ret=0x2be91c98) at gstpushsrc.c:132
#11 0x2b0df3d8 in gst_base_src_get_range (src=0xf40e0, offset=13630,
length=4096, buf=0x2be91cf4) at gstbasesrc.c:2400
#12 0x2b0e0318 in gst_base_src_loop (pad=0xf6060) at gstbasesrc.c:2640
#13 0x2ab884a4 in gst_task_func (task=0x101850) at gsttask.c:316
#14 0x2ab89a98 in default_func (tdata=0xfa080, pool=0x25000) at
gsttaskpool.c:70
#15 0x2ac8c034 in g_thread_pool_thread_proxy () from
/app/qtBrowser/lib/libglib-2.0.so.0
#16 0x2ac8b6d8 in g_thread_proxy () from /app/qtBrowser/lib/libglib-2.0.so.0
#17 0x2ae3c1ec in start_thread () from /lib/libpthread.so.0


=====================================
1.
I found that g_main_loop_run will be called in gst_push_src_create. I think
this will cost some time.

2. read_body_chunk will call priv->chunk_allocator (msg, io->read_length,
priv->chunk_allocator_data);
   chunk_allocator is implement by gst_soup_http_src_chunk_allocator.

So I don't think chunk allocator is the bottleneck.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list