Announcement

Collapse
No announcement yet.

Announcing radeontop, a tool for viewing the GPU usage

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Add CPU usage as well so that it can be seen at a glance whether it's CPU or GPU bound?

    Comment


    • #32
      Originally posted by whizse View Post
      There's already a similar tool for intel, that's the inspiration for this one.
      Yep, and what is exposed varies by hw.

      Comment


      • #33
        Originally posted by frief View Post
        Add CPU usage as well so that it can be seen at a glance whether it's CPU or GPU bound?
        Out of scope really, just use top/vmstat/etc/etc in another window

        Comment


        • #34
          Originally posted by Xaseron View Post
          01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Barts XT [ATI Radeon HD 6800 Series]
          09:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RV710 [Radeon HD 4550]

          I use the second one for displaying my desktop.
          Please try 0.5.4 with the --bus option. Ie "radeontop -b 9" to pick the second card.

          Comment


          • #35
            Works. Great work!!!

            Comment


            • #36
              No ouput for RS880 with v0.5.4

              Hi,

              I am running Xubuntu 12.04 (I enclose details about my system at the end of the message).
              I am using the open source radeon driver.
              My AMD video card is a RS880, it is a HD4290 integrated in ASUS motherboard.
              I downloaded, (installed libpciaccess-dev) , and compiled radeontop.
              But when I run it, all the counters show 0.00% forever (the top title says "radeontop v0.5.4, running on RS880, 120 samples/sec").
              Could it be a bug with integrated R600 chipset?
              Thanks
              Regards

              System Software / Hardware Information

              Hardware:
              Processor: AMD Athlon II X4 610e @ 2.40GHz (4 Cores), Motherboard: ASUS M4A89GTD-PRO/USB3, Chipset: AMD RS880, Memory: 8192MB, Disk: 2000GB Western Digital WD20EARS-00M, Graphics: LLVMpipe, Audio: Realtek ALC892, Network: Realtek RTL8111/8168B

              Software:
              OS: Ubuntu 12.04, Kernel: 3.5.0-3-generic (x86_64), Desktop: Xfce 4.8, Display Server: X Server 1.12.3, Display Driver: vesa 2.3.1, OpenGL: 2.1 Mesa 8.1-devel Gallium 0.4, Compiler: GCC 4.6, File-System: ext4, Screen Resolution: 1280x1024


              dmesg | grep radeon
              [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.5.0-3-generic root=UUID=e2da3456-41b1-41be-a07c-e0d9abef305e ro radeon.audio=1 quiet splash vt.handoff=7
              [ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.5.0-3-generic root=UUID=e2da3456-41b1-41be-a07c-e0d9abef305e ro radeon.audio=1 quiet splash vt.handoff=7
              [ 9.007878] [drm] radeon defaulting to kernel modesetting.
              [ 9.007881] [drm] radeon kernel modesetting enabled.
              [ 9.008926] radeon 0000:01:05.0: VRAM: 624M 0x00000000C0000000 - 0x00000000E6FFFFFF (624M used)
              [ 9.008928] radeon 0000:01:05.0: GTT: 512M 0x00000000A0000000 - 0x00000000BFFFFFFF
              [ 9.009478] [drm] radeon: 624M of VRAM memory ready
              [ 9.009480] [drm] radeon: 512M of GTT memory ready.
              [ 9.009515] [drm] radeon: irq initialized.
              [ 9.096860] radeon 0000:01:05.0: WB enabled
              [ 9.096864] radeon 0000:01:05.0: fence driver on ring 0 use gpu addr 0x00000000a0000c00 and cpu addr 0xffff880203056c00
              [ 9.097094] radeon 0000:01:05.0: setting latency timer to 64
              [ 9.134587] [drm] radeon: power management initialized
              [ 9.189317] fbcon: radeondrmfb (fb0) is primary device
              [ 9.189460] fb0: radeondrmfb frame buffer device
              [ 9.189469] [drm] Initialized radeon 2.17.0 20080528 for 0000:01:05.0 on minor 0


              lsmod | grep radeon
              radeon 908548 2
              ttm 88492 1 radeon
              drm_kms_helper 46931 1 radeon
              drm 277056 3 radeon,ttm,drm_kms_helper
              i2c_algo_bit 13564 2 bttv,radeon

              Comment


              • #37
                Originally posted by jarodcanal View Post
                But when I run it, all the counters show 0.00% forever (the top title says "radeontop v0.5.4, running on RS880, 120 samples/sec").
                Not playing Captain Obvious: Are you sure the 3D engine is busy?

                I'm not using a compositor WM.
                So unless I start, i.e., glxgears all counters are at 0% as well.

                Comment


                • #38
                  Hi,
                  Actually, I run glxgears in parallel before posting on the thread, and radeontop keep reporting 0.00% for everything on my system.
                  Could it be that all 3d stuff is done by software instead of using HD4290?
                  The phoronix test suite info I included states that the driver in use is "vesa", maybe it should be "radeon" to get some 3D acceleration?
                  How could I check that?
                  Thanks
                  Regards

                  with glxgear i get lines like:
                  1563 frames in 5.0 seconds = 312.579 FPS

                  glxinfo
                  name of display: :0.0
                  display: :0 screen: 0
                  direct rendering: Yes
                  server glx vendor string: SGI
                  server glx version string: 1.4
                  server glx extensions:
                  GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,
                  GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method,
                  GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
                  GLX_SGIX_pbuffer, GLX_MESA_copy_sub_buffer, GLX_INTEL_swap_event
                  client glx vendor string: Mesa Project and SGI
                  client glx version string: 1.4
                  client glx extensions:
                  GLX_ARB_create_context, GLX_ARB_create_context_profile,
                  GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
                  GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_framebuffer_sRGB,
                  GLX_EXT_create_context_es2_profile, GLX_MESA_copy_sub_buffer,
                  GLX_MESA_multithread_makecurrent, GLX_MESA_swap_control,
                  GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGI_make_current_read,
                  GLX_SGI_swap_control, GLX_SGI_video_sync, GLX_SGIS_multisample,
                  GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group,
                  GLX_EXT_texture_from_pixmap, GLX_INTEL_swap_event
                  GLX version: 1.4
                  GLX extensions:
                  GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
                  GLX_EXT_visual_info, GLX_EXT_visual_rating,
                  GLX_MESA_multithread_makecurrent, GLX_OML_swap_method,
                  GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
                  GLX_SGIX_pbuffer, GLX_EXT_texture_from_pixmap
                  OpenGL vendor string: VMware, Inc.
                  OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 0x301)
                  OpenGL version string: 2.1 Mesa 8.1-devel
                  OpenGL shading language version string: 1.20
                  OpenGL extensions:
                  GL_ARB_multisample, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color,
                  GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_copy_texture,
                  GL_EXT_polygon_offset, GL_EXT_subtexture, GL_EXT_texture_object,
                  GL_EXT_vertex_array, GL_EXT_compiled_vertex_array, GL_EXT_texture,
                  GL_EXT_texture3D, GL_IBM_rasterpos_clip, GL_ARB_point_parameters,
                  GL_EXT_draw_range_elements, GL_EXT_packed_pixels, GL_EXT_point_parameters,
                  GL_EXT_rescale_normal, GL_EXT_separate_specular_color,
                  GL_EXT_texture_edge_clamp, GL_SGIS_generate_mipmap,
                  GL_SGIS_texture_border_clamp, GL_SGIS_texture_edge_clamp,
                  GL_SGIS_texture_lod, GL_ARB_multitexture, GL_IBM_multimode_draw_arrays,
                  GL_IBM_texture_mirrored_repeat, GL_ARB_texture_cube_map,
                  GL_ARB_texture_env_add, GL_ARB_transpose_matrix,
                  GL_EXT_blend_func_separate, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays,
                  GL_EXT_secondary_color, GL_EXT_texture_env_add, GL_EXT_texture_lod_bias,
                  GL_INGR_blend_func_separate, GL_NV_blend_square, GL_NV_light_max_exponent,
                  GL_NV_texgen_reflection, GL_NV_texture_env_combine4, GL_S3_s3tc,
                  GL_SUN_multi_draw_arrays, GL_ARB_texture_border_clamp,
                  GL_ARB_texture_compression, GL_EXT_framebuffer_object,
                  GL_EXT_texture_compression_s3tc, GL_EXT_texture_env_combine,
                  GL_EXT_texture_env_dot3, GL_MESA_window_pos, GL_NV_packed_depth_stencil,
                  GL_NV_texture_rectangle, GL_ARB_depth_texture, GL_ARB_occlusion_query,
                  GL_ARB_shadow, GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar,
                  GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat,
                  GL_ARB_window_pos, GL_EXT_stencil_two_side, GL_EXT_texture_cube_map,
                  GL_NV_fog_distance, GL_APPLE_packed_pixels, GL_APPLE_vertex_array_object,
                  GL_ARB_draw_buffers, GL_ARB_fragment_program, GL_ARB_fragment_shader,
                  GL_ARB_shader_objects, GL_ARB_vertex_program, GL_ARB_vertex_shader,
                  GL_ATI_draw_buffers, GL_ATI_texture_env_combine3, GL_ATI_texture_float,
                  GL_EXT_shadow_funcs, GL_EXT_stencil_wrap, GL_MESA_pack_invert,
                  GL_MESA_ycbcr_texture, GL_NV_primitive_restart,
                  GL_ARB_fragment_program_shadow, GL_ARB_half_float_pixel,
                  GL_ARB_occlusion_query2, GL_ARB_point_sprite, GL_ARB_shading_language_100,
                  GL_ARB_sync, GL_ARB_texture_non_power_of_two, GL_ARB_vertex_buffer_object,
                  GL_ATI_blend_equation_separate, GL_EXT_blend_equation_separate,
                  GL_OES_read_format, GL_ARB_pixel_buffer_object,
                  GL_ARB_texture_compression_rgtc, GL_ARB_texture_float,
                  GL_ARB_texture_rectangle, GL_ATI_texture_compression_3dc,
                  GL_EXT_packed_float, GL_EXT_pixel_buffer_object,
                  GL_EXT_texture_compression_dxt1, GL_EXT_texture_compression_rgtc,
                  GL_EXT_texture_mirror_clamp, GL_EXT_texture_rectangle,
                  GL_EXT_texture_sRGB, GL_EXT_texture_shared_exponent,
                  GL_ARB_framebuffer_object, GL_EXT_framebuffer_blit,
                  GL_EXT_framebuffer_multisample, GL_EXT_packed_depth_stencil,
                  GL_ARB_vertex_array_object, GL_ATI_separate_stencil,
                  GL_ATI_texture_mirror_once, GL_EXT_draw_buffers2, GL_EXT_draw_instanced,
                  GL_EXT_gpu_program_parameters, GL_EXT_texture_compression_latc,
                  GL_EXT_texture_sRGB_decode, GL_OES_EGL_image, GL_ARB_copy_buffer,
                  GL_ARB_draw_instanced, GL_ARB_half_float_vertex, GL_ARB_instanced_arrays,
                  GL_ARB_map_buffer_range, GL_ARB_texture_rg, GL_ARB_texture_swizzle,
                  GL_ARB_vertex_array_bgra, GL_EXT_separate_shader_objects,
                  GL_EXT_texture_swizzle, GL_EXT_vertex_array_bgra,
                  GL_NV_conditional_render, GL_AMD_draw_buffers_blend,
                  GL_ARB_ES2_compatibility, GL_ARB_debug_output, GL_ARB_draw_buffers_blend,
                  GL_ARB_draw_elements_base_vertex, GL_ARB_explicit_attrib_location,
                  GL_ARB_fragment_coord_conventions, GL_ARB_provoking_vertex,
                  GL_ARB_sampler_objects, GL_ARB_shader_texture_lod,
                  GL_ARB_vertex_type_2_10_10_10_rev, GL_EXT_provoking_vertex,
                  GL_EXT_texture_snorm, GL_MESA_texture_signed_rgba, GL_ARB_robustness,
                  GL_ARB_texture_storage

                  96 GLX Visuals

                  Comment


                  • #39
                    At first glance that looks like software rendering (on the CPU). There should be a renderer line mentioning Gallium.

                    EDIT -- whoops, it was Gallium but not Gallium with HW acceleration

                    You need to be running the radeon driver to get 3D HW acceleration.
                    Last edited by bridgman; 07-09-2012, 05:26 PM.

                    Comment


                    • #40
                      Originally posted by jarodcanal View Post
                      Hi,
                      Actually, I run glxgears in parallel before posting on the thread, and radeontop keep reporting 0.00% for everything on my system.
                      Could it be that all 3d stuff is done by software instead of using HD4290?
                      Indeed, you're running LLVMpipe.

                      Originally posted by jarodcanal View Post
                      OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 0x301)
                      OpenGL version string: 2.1 Mesa 8.1-devel
                      OpenGL shading language version string: 1.20
                      You want something similar to this:

                      OpenGL renderer string: Gallium 0.4 on AMD RS880
                      Since I don't use Ubuntu, I'm probably not much of help when it comes to package names.
                      Nevertheless, this looks helpful: https://help.ubuntu.com/community/RadeonDriver

                      Comment


                      • #41
                        Thanks for the info, I will try to get the 3D acceleration working, and I will try radeontop again.
                        Regards

                        Comment


                        • #42
                          radeontop working OK with RS880

                          glxinfo | grep render
                          direct rendering: Yes
                          OpenGL renderer string: Gallium 0.4 on AMD RS880

                          :-) got it working
                          (I just had to install package xserver-xorg-video-radeon from http://ppa.launchpad.net/xorg-edgers/ppa/ubuntu, and reboot)
                          Now, radeontop is showing some nice counters when running glxgears.
                          Thanks for your help.
                          Regards

                          Comment


                          • #43
                            Interesting tool. Does "Graphics pipe<<100%" mean CPU bottleneck? I've done some tests (AII 240+HD6670):
                            Amnesia: TDD (1280x720): Graphics pipe=100%
                            OilRush (1280x720): Graphics pipe=100%
                            Enemy Territory: Quake Wars Demo (1280x720): Graphics pipe=50-60%
                            Red Eclipse (1280x720): Graphics pipe=10-20% (but very high fps)
                            HL2: Lost Coast (1280x720/Wine): Graphics pipe=50-60%
                            Serious Sam 3 BFE (1024x768/Wine/D3D*): Graphics pipe=100%

                            *OpenGL backend works only with Catalyst

                            Comment


                            • #44
                              First tarball release up, 0.5.4.1. No real changes from .4, just more convenient packaging for people who don't like git.

                              Does "Graphics pipe<<100%" mean CPU bottleneck?
                              Yes, but you can't know whether that CPU bottleneck is in mesa or in the app just by these counters. Use CPU profilers to find that out.
                              Note that vsync can drop the pipe usage, for proper numbers disable vsync.

                              Comment


                              • #45
                                0001-showing-averaged-and-instantaneous-bars.patch

                                Add overlayed bars (using '+' char) with exponential moving averages.
                                Used %5.1 format specifier for percentages to avoid jumping columns.

                                I added these overlayed bars for the first 4 percentages only, so it
                                can be seen what this would be about.

                                I would have liked to attach text file (the patch) to this mail but
                                the forum software doesn't let me (only videos and images).
                                Enclosing as code instead.

                                Greetings,
                                Frieder

                                Code:
                                From 2e52e85eef0a15177854bff38381331d972ad7f6 Mon Sep 17 00:00:00 2001
                                From: Frieder Ferlemann <Frieder.Ferlemann@NOSPAMweb.de>
                                Date: Tue, 10 Jul 2012 22:43:37 +0200
                                Subject: [PATCH] showing averaged and instantaneous bars
                                
                                Add overlayed bars (using '+' char) with exponential moving averages.
                                Used %5.1 format specifier for percentages to avoid jumping columns.
                                ---
                                 ui.c |   74 +++++++++++++++++++++++++++++++++++++++++++++++++----------------
                                 1 files changed, 56 insertions(+), 18 deletions(-)
                                
                                diff --git a/ui.c b/ui.c
                                index 48b82cb..6e79f02 100644
                                --- a/ui.c
                                +++ b/ui.c
                                @@ -66,6 +66,30 @@ static void percentage(const unsigned int y, const unsigned int w, const float p
                                 	attroff(A_REVERSE);
                                 }
                                 
                                +static void percentage2(const unsigned int y, const unsigned int w, const float p, const float p2) {
                                +
                                +	const unsigned int x = (w/2) + 2;
                                +	unsigned int len = w - x - 1;
                                +	unsigned int len2 = len;
                                +	unsigned int minlen = 0;
                                +
                                +	len  = len  * (p  / 100.0);
                                +	len2 = len2 * (p2 / 100.0);
                                +	minlen = (len <= len2) ? len : len2;
                                +
                                +	attron(A_REVERSE);
                                +	mvhline(y, x, '+', minlen);
                                +
                                +	if(len <= len2) {
                                +		attroff(A_REVERSE);
                                +		mvhline(y, x+minlen, '+', len2-minlen);
                                +	}
                                +	else {
                                +		mvhline(y, x+minlen, ' ', len-minlen);
                                +		attroff(A_REVERSE);
                                +	}
                                +}
                                +
                                 void present(const unsigned int ticks, const char card[], const unsigned int color) {
                                 
                                 	// This does not need to be atomic. A delay here is acceptable.
                                @@ -122,39 +146,53 @@ void present(const unsigned int ticks, const char card[], const unsigned int col
                                 		float cr = 100.0 * (float) results->cr / ticks;
                                 		float cb = 100.0 * (float) results->cb / ticks;
                                 
                                +		// determins time constant for moving averages
                                +		const float alpha = 0.3;
                                +
                                +		static float ee_avg = 0;
                                +		static float vgt_avg = 0;
                                +		static float gui_avg = 0;
                                +		static float ta_avg = 0;
                                +
                                +		// calculate exponential moving averages
                                +		ee_avg  = ee_avg  * (1 - alpha) + ee  * alpha;
                                +		vgt_avg = vgt_avg * (1 - alpha) + vgt * alpha;
                                +		gui_avg = gui_avg * (1 - alpha) + gui * alpha;
                                +		ta_avg  = ta_avg  * (1 - alpha) + ta  * alpha;
                                +
                                 		mvhline(3, 0, ACS_HLINE, w);
                                 		mvvline(1, (w/2) + 1, ACS_VLINE, h);
                                 		mvaddch(3, (w/2) + 1, ACS_PLUS);
                                 
                                 		if (color) attron(COLOR_PAIR(1));
                                -		percentage(2, w, gui);
                                -		printright(2, hw, _("Graphics pipe %.2f%%"), gui);
                                +		percentage2(2, w, gui, gui_avg);
                                +		printright(2, hw, _("Graphics pipe %5.1f%% %5.1f%%"), gui, gui_avg);
                                 		if (color) attroff(COLOR_PAIR(1));
                                 
                                 		unsigned int start = 4;
                                 
                                -		percentage(start, w, ee);
                                -		printright(start++, hw, _("Event Engine %.2f%%"), ee);
                                +		percentage2(start, w, ee, ee_avg);
                                +		printright(start++, hw, _("Event Engine %5.1f%% %5.1f%%"), ee, ee_avg);
                                 
                                 		// Enough height?
                                 		if (h > bigh) start++;
                                 
                                 		if (color) attron(COLOR_PAIR(2));
                                -		percentage(start, w, vgt);
                                -		printright(start++, hw, _("Vertex Grouper + Tesselator %.2f%%"), vgt);
                                +		percentage2(start, w, vgt, vgt_avg);
                                +		printright(start++, hw, _("Vertex Grouper + Tesselator %5.1f%% %5.1f%%"), vgt, vgt_avg);
                                 		if (color) attroff(COLOR_PAIR(2));
                                 
                                 		// Enough height?
                                 		if (h > bigh) start++;
                                 
                                 		if (color) attron(COLOR_PAIR(3));
                                -		percentage(start, w, ta);
                                -		printright(start++, hw, _("Texture Addresser %.2f%%"), ta);
                                +		percentage2(start, w, ta, ta_avg);
                                +		printright(start++, hw, _("Texture Addresser %5.1f%% %5.1f%%"), ta, ta_avg);
                                 
                                 		// This is only present on R600
                                 		if (bits.tc) {
                                 			percentage(start, w, tc);
                                -			printright(start++, hw, _("Texture Cache %.2f%%"), tc);
                                +			printright(start++, hw, _("Texture Cache %5.1f%%"), tc);
                                 		}
                                 		if (color) attroff(COLOR_PAIR(3));
                                 
                                @@ -163,18 +201,18 @@ void present(const unsigned int ticks, const char card[], const unsigned int col
                                 
                                 		if (color) attron(COLOR_PAIR(4));
                                 		percentage(start, w, sx);
                                -		printright(start++, hw, _("Shader Export %.2f%%"), sx);
                                +		printright(start++, hw, _("Shader Export %5.1f%%"), sx);
                                 
                                 		percentage(start, w, sh);
                                -		printright(start++, hw, _("Sequencer Instruction Cache %.2f%%"), sh);
                                +		printright(start++, hw, _("Sequencer Instruction Cache %5.1f%%"), sh);
                                 
                                 		percentage(start, w, spi);
                                -		printright(start++, hw, _("Shader Interpolator %.2f%%"), spi);
                                +		printright(start++, hw, _("Shader Interpolator %5.1f%%"), spi);
                                 
                                 		// only on R600
                                 		if (bits.smx) {
                                 			percentage(start, w, smx);
                                -			printright(start++, hw, _("Shader Memory Exchange %.2f%%"), smx);
                                +			printright(start++, hw, _("Shader Memory Exchange %5.1f%%"), smx);
                                 		}
                                 		if (color) attroff(COLOR_PAIR(4));
                                 
                                @@ -182,25 +220,25 @@ void present(const unsigned int ticks, const char card[], const unsigned int col
                                 		if (h > bigh) start++;
                                 
                                 		percentage(start, w, sc);
                                -		printright(start++, hw, _("Scan Converter %.2f%%"), sc);
                                +		printright(start++, hw, _("Scan Converter %5.1f%%"), sc);
                                 
                                 		percentage(start, w, pa);
                                -		printright(start++, hw, _("Primitive Assembly %.2f%%"), pa);
                                +		printright(start++, hw, _("Primitive Assembly %5.1f%%"), pa);
                                 
                                 		// Enough height?
                                 		if (h > bigh) start++;
                                 
                                 		if (color) attron(COLOR_PAIR(5));
                                 		percentage(start, w, db);
                                -		printright(start++, hw, _("Depth Block %.2f%%"), db);
                                +		printright(start++, hw, _("Depth Block %5.1f%%"), db);
                                 
                                 		percentage(start, w, cb);
                                -		printright(start++, hw, _("Color Block %.2f%%"), cb);
                                +		printright(start++, hw, _("Color Block %5.1f%%"), cb);
                                 
                                 		// Only present on R600
                                 		if (bits.cr) {
                                 			percentage(start, w, cr);
                                -			printright(start++, hw, _("Clip Rectangle %.2f%%"), cr);
                                +			printright(start++, hw, _("Clip Rectangle %5.1f%%"), cr);
                                 		}
                                 		if (color) attroff(COLOR_PAIR(5));
                                 
                                -- 
                                1.7.7

                                Comment

                                Working...
                                X