Frame Rates Too High!?

Hi all,
It seems like I’m getting SDL_Flip to block on my monitor’s refresh rate, but
if so, I’m getting too many frames a second. I’m trying to understand why and
what could and should be done about it.

Details:
I’m getting up to 111 frames/second with a monitor (hp 1730) that the
manufacture reports can refresh at up to 76Hz and display properties reports
that the refresh rate is at 76Hz and CPU is at 10% when animating a 300x300
image across the screen. SDL (definately seems like it) is blocking at
SDL_Flip to wait, apparently, for the refresh to finish. SDL_Flip is taking 9
milliseconds when doing nothing else but flipping. It should take longer -
about 13 milliseconds.

Intel 865 graphics
Intel P4 2.4GHz
Fedora Core 2 (Linux 2.6.5)
set at millions of colors (32 bits), and 1280x1024.

Thanks!____________________________________________________
Start your day with Yahoo! - make it your home page

Nothing is wrong. You are just drawing more frames than the monitor can
display. If you are able to turn on vertical sync, you would see
different results. I would not worry about the FPS untill it drops
below your monitors refresh rate.

HTH,
Richard

G B wrote:>Hi all,

It seems like I’m getting SDL_Flip to block on my monitor’s refresh rate, but
if so, I’m getting too many frames a second. I’m trying to understand why and
what could and should be done about it.

Details:
I’m getting up to 111 frames/second with a monitor (hp 1730) that the
manufacture reports can refresh at up to 76Hz and display properties reports
that the refresh rate is at 76Hz and CPU is at 10% when animating a 300x300
image across the screen. SDL (definately seems like it) is blocking at
SDL_Flip to wait, apparently, for the refresh to finish. SDL_Flip is taking 9
milliseconds when doing nothing else but flipping. It should take longer -
about 13 milliseconds.

Intel 865 graphics
Intel P4 2.4GHz
Fedora Core 2 (Linux 2.6.5)
set at millions of colors (32 bits), and 1280x1024.

Thanks!


Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Richard,

Thank you for your reply.

If SDL is not using vertical sync, why can I get only 111 frames/second while
my CPU is at less than 10% use? Shouldn’t the CPU use goes to 90%+ if blitting
frequency is not limited by vertical sync? What else is likely to be holding
the CPU back?

Thanks,
G B

— Richard J Hancock wrote:> Nothing is wrong. You are just drawing more frames than the monitor can

display. If you are able to turn on vertical sync, you would see
different results. I would not worry about the FPS untill it drops
below your monitors refresh rate.

HTH,
Richard

G B wrote:

Hi all,
It seems like I’m getting SDL_Flip to block on my monitor’s refresh rate,
but
if so, I’m getting too many frames a second. I’m trying to understand why
and
what could and should be done about it.

Details:
I’m getting up to 111 frames/second with a monitor (hp 1730) that the
manufacture reports can refresh at up to 76Hz and display properties reports
that the refresh rate is at 76Hz and CPU is at 10% when animating a 300x300
image across the screen. SDL (definately seems like it) is blocking at
SDL_Flip to wait, apparently, for the refresh to finish. SDL_Flip is taking
9
milliseconds when doing nothing else but flipping. It should take longer -
about 13 milliseconds.

Intel 865 graphics
Intel P4 2.4GHz
Fedora Core 2 (Linux 2.6.5)
set at millions of colors (32 bits), and 1280x1024.

Thanks!


Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

You’re video card/graphics processor is probably doing all of the work
that you think your CPU should be doing so it’s not surprising that
your CPU is 90% idle.

ErikOn 7/18/05, G B wrote:

Richard,

Thank you for your reply.

If SDL is not using vertical sync, why can I get only 111 frames/second while
my CPU is at less than 10% use? Shouldn’t the CPU use goes to 90%+ if blitting
frequency is not limited by vertical sync? What else is likely to be holding
the CPU back?

Thanks,
G B

— Richard J Hancock wrote:

Nothing is wrong. You are just drawing more frames than the monitor can
display. If you are able to turn on vertical sync, you would see
different results. I would not worry about the FPS untill it drops
below your monitors refresh rate.

HTH,
Richard

G B wrote:

Hi all,
It seems like I’m getting SDL_Flip to block on my monitor’s refresh rate,
but
if so, I’m getting too many frames a second. I’m trying to understand why
and
what could and should be done about it.

Details:
I’m getting up to 111 frames/second with a monitor (hp 1730) that the
manufacture reports can refresh at up to 76Hz and display properties reports
that the refresh rate is at 76Hz and CPU is at 10% when animating a 300x300
image across the screen. SDL (definately seems like it) is blocking at
SDL_Flip to wait, apparently, for the refresh to finish. SDL_Flip is taking
9
milliseconds when doing nothing else but flipping. It should take longer -
about 13 milliseconds.

Intel 865 graphics
Intel P4 2.4GHz
Fedora Core 2 (Linux 2.6.5)
set at millions of colors (32 bits), and 1280x1024.

Thanks!


Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

G B

If SDL is not using vertical sync, why can I get only 111 frames/second while
my CPU is at less than 10% use? Shouldn’t the CPU use goes to 90%+ if blitting
frequency is not limited by vertical sync?

Only on a windows platform would you ever see a spike to 90%+. *nix
systems in my expierence are MUCH better at handling resources and thuse
rarely go over 10% (even when playing graphics intense games). I would
sugest stop looking at FPS and start looking at how long it takes to
draw each frame. If the number jumps, then you have an problem.
Remember, your eye sees in 27FPS, your monitor draws at least 60FPS.
You still have room to mess with.

What else is likely to be holding the CPU back?

Most likely nothing. Your machine is probably just not doing enough to
warrent using all of it.

Richard

Hi All,

Thanks for your input Erik,

If this is the case, does it mean that my modern video card/graphics processor
is at 100% usage or otherwise can’t do more than a mere 111 frames/second of
blitting a 300x300 image?

Thanks,
G B

— Erik Gillespie <erik.gillespie at gmail.com> wrote:> You’re video card/graphics processor is probably doing all of the work

that you think your CPU should be doing so it’s not surprising that
your CPU is 90% idle.

Erik

On 7/18/05, G B <@G_B> wrote:

Richard,

Thank you for your reply.

If SDL is not using vertical sync, why can I get only 111 frames/second
while
my CPU is at less than 10% use? Shouldn’t the CPU use goes to 90%+ if
blitting
frequency is not limited by vertical sync? What else is likely to be
holding
the CPU back?

Thanks,
G B

— Richard J Hancock wrote:

Nothing is wrong. You are just drawing more frames than the monitor can
display. If you are able to turn on vertical sync, you would see
different results. I would not worry about the FPS untill it drops
below your monitors refresh rate.

HTH,
Richard

G B wrote:

Hi all,
It seems like I’m getting SDL_Flip to block on my monitor’s refresh
rate,

but

if so, I’m getting too many frames a second. I’m trying to understand
why

and

what could and should be done about it.

Details:
I’m getting up to 111 frames/second with a monitor (hp 1730) that the
manufacture reports can refresh at up to 76Hz and display properties
reports

that the refresh rate is at 76Hz and CPU is at 10% when animating a
300x300

image across the screen. SDL (definately seems like it) is blocking
at

SDL_Flip to wait, apparently, for the refresh to finish. SDL_Flip is
taking

9

milliseconds when doing nothing else but flipping. It should take
longer -

about 13 milliseconds.

Intel 865 graphics
Intel P4 2.4GHz
Fedora Core 2 (Linux 2.6.5)
set at millions of colors (32 bits), and 1280x1024.

Thanks!


Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Start your day with Yahoo! - make it your home page

No. It just means it is not optimised and could be cause by anything.
If the graphics card is doing all the work, you are either fillrate
limited or bandwidth limited. Are you using a software or hardware
surface? Are you blitting from software to hardware? Hardware to
software? These are all things that can slow down the blitting. What
video card are you using?

Richard

G B wrote:>Hi All,

Thanks for your input Erik,

If this is the case, does it mean that my modern video card/graphics processor
is at 100% usage or otherwise can’t do more than a mere 111 frames/second of
blitting a 300x300 image?

Thanks,
G B

— Erik Gillespie <erik.gillespie at gmail.com> wrote:

You’re video card/graphics processor is probably doing all of the work
that you think your CPU should be doing so it’s not surprising that
your CPU is 90% idle.

Erik

On 7/18/05, G B wrote:

Richard,

Thank you for your reply.

If SDL is not using vertical sync, why can I get only 111 frames/second

while

my CPU is at less than 10% use? Shouldn’t the CPU use goes to 90%+ if

blitting

frequency is not limited by vertical sync? What else is likely to be

holding

the CPU back?

Thanks,
G B

— Richard J Hancock <@Richard_J_Hancock> wrote:

Nothing is wrong. You are just drawing more frames than the monitor can
display. If you are able to turn on vertical sync, you would see
different results. I would not worry about the FPS untill it drops
below your monitors refresh rate.

HTH,
Richard

G B wrote:

Hi all,
It seems like I’m getting SDL_Flip to block on my monitor’s refresh

rate,

but

if so, I’m getting too many frames a second. I’m trying to understand

why

and

what could and should be done about it.

Details:
I’m getting up to 111 frames/second with a monitor (hp 1730) that the
manufacture reports can refresh at up to 76Hz and display properties

reports

that the refresh rate is at 76Hz and CPU is at 10% when animating a

300x300

image across the screen. SDL (definately seems like it) is blocking

at

SDL_Flip to wait, apparently, for the refresh to finish. SDL_Flip is

taking

9

milliseconds when doing nothing else but flipping. It should take

longer -

about 13 milliseconds.

Intel 865 graphics
Intel P4 2.4GHz
Fedora Core 2 (Linux 2.6.5)
set at millions of colors (32 bits), and 1280x1024.

Thanks!


Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl