1

Throttling at will the execution and display speed of a particular process, for example, a game, a flash game, or an OpenGL game. I want to be able to slow it down to 20% or 0.5%. This is simply not possible on host space in linux.

But linux supports two kernel-level virtualisation environments: KVM and lxc.

Question: Is it possible to provide a fake system clock to a virtual lxc or KVM machine so that a flash game running in the guest will not run faster than what is set to run?

lurscher
  • 25,930
  • 29
  • 122
  • 185

2 Answers2

1

Some choices:

  1. Qemu brake patch (will require work to apply no doubt.)
  2. Bochs has ips=NNNN to define CPU "Instructions Per Second".
  3. cpulimit a tool for limiting the CPU usage of a process (does not require virtualization.)

Update: You want this: https://superuser.com/questions/454534/how-can-i-slow-down-the-framerate-of-a-flash-game

Community
  • 1
  • 1
  • the problem with a cpu throttling approach is that will not necessarily slow down animation timers, this needs to happen with a slow down of the virtual hardware clock as well, but thanks for the suggestions – lurscher Apr 20 '13 at 15:35
0

I found a prototype version of the CheatEngine speed hack that works for linux.

http://forum.cheatengine.org/viewtopic.php?t=533437&sid=1a83d81ee08f8479eb8b190939b2e1aa

http://code.google.com/p/xeat-engine/source/checkout

http://pastebin.com/ZLryd20D

Basically it replaces gettimeofday with a hacked version using LD_PRELOAD magic. It works perfectly!

thanks lilezek! wherever you are!

lurscher
  • 25,930
  • 29
  • 122
  • 185