Page 1 of 1
(Solved) Slow Bochs on Linux
Posted: Sat Feb 11, 2017 5:23 am
by Octacone
I have a massive massive problem. When I run Bochs on Windows it is as smooth as ****, but when I run it on Linux it is as slow as ****. This is driving me crazy since I can't do any of debugging. I am running the latest Ubuntu 16.10, also I have an SSD. Like what could be the problem? When I run Bochs it all starts to blink, my computer freezes, I can't press any of the buttons on it (Bochs buttons), it takes 10 seconds for 1 character to print. Imagine something being as slow as **** and then imagine it again and then square it and then square it again with the square you got -> extremely slow, painfully slow. I tried reinstalling it, but no help.
P.S Sorry if I posted inside a wrong forum section. Didn't know where to put it, fits in here the most.
Re: Slow Bochs on Linux
Posted: Sat Feb 11, 2017 5:24 am
by BrightLight
Attach your bochsrc file.
What version of Bochs is it, too? Did you compile it yourself? If so, what configure options did you use?
Re: Slow Bochs on Linux
Posted: Sat Feb 11, 2017 5:39 am
by Octacone
omarrx024 wrote:Attach your bochsrc file.
What version of Bochs is it, too? Did you compile it yourself? If so, what configure options did you use?
I didn't compile it myself.
Here is my configuration file:
Code: Select all
log: xxx_hidden
memory: guest=512, host=512
cpu: count=1, ips=50000000, reset_on_triple_fault=0, cpuid_limit_winnt=0
cpuid: mmx=1, sep=1, sse=sse2, aes=0, movbe=0, xsave=0
port_e9_hack: enabled=1
romimage: file="/usr/share/bochs/BIOS-bochs-latest", address=0xfffe0000
vgaromimage: file="/usr/share/bochs/VGABIOS-lgpl-latest"
vga_update_interval: 25000
mouse: enabled=1, toggle=f12
panic: action=ask
error: action=report
info: action=report
debug: action=report
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15
ata0-slave: type=cdrom, path="xxx_hidden", status=inserted
boot: cdrom
Re: Slow Bochs on Linux
Posted: Sat Feb 11, 2017 5:45 am
by BrightLight
Maybe replace "vga_update_interval" line with this:
Code: Select all
vga: extension=vbe, update_freq=5, realtime=1
Adding this line may speed it up too, although the time emulation will not be accurate:
Code: Select all
clock: sync=none, time0=local, rtc_sync=0
(Solved) Slow Bochs on Linux
Posted: Sat Feb 11, 2017 6:05 am
by Octacone
omarrx024 wrote:Maybe replace "vga_update_interval" line with this:
Code: Select all
vga: extension=vbe, update_freq=5, realtime=1
Adding this line may speed it up too, although the time emulation will not be accurate:
Code: Select all
clock: sync=none, time0=local, rtc_sync=0
Thanks! I guess it was because of it. I also modified some other parameters and now my configuration file looks like this:
Code: Select all
ata0-master: type=cdrom, path="xxx", status=inserted
boot: cdrom
display_library: sdl
cpu: count=1 ips=200000000, reset_on_triple_fault=0
memory: guest=512, host=512
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest
romimage: file=$BXSHARE/BIOS-bochs-legacy, address=0xffff0000
vga: extension=vbe, update_freq=5
log: xxx
port_e9_hack: enabled=1
mouse: enabled=1, toggle=f12
cpuid: mmx=1, sep=1, sse=sse4_2
clock: sync=none, time0=local, rtc_sync=1
Now it is even faster than Windows. It loads instantly.
Re: (Solved) Slow Bochs on Linux
Posted: Sat Feb 11, 2017 6:29 am
by BrightLight
Talking from the point of view of someone who is doing OS development, this problem shouldn't need to be posted in a forum asking for help. Instead, you should have compared the bochsrc on Windows and Linux, and determined the problem yourself. All I did was compare your bochsrc with mine.
Re: (Solved) Slow Bochs on Linux
Posted: Sat Feb 11, 2017 6:52 am
by alexfru
omarrx024 wrote:this problem shouldn't need to be posted in a forum asking for help. Instead, you should have compared the bochsrc on Windows and Linux, and determined the problem yourself.
For that one needs to be certain that the same configuration file has the same (or nearly the same) effect on both systems and isn't hiding some important implementation detail behind the abstraction of the options contained in the file. Clearly, the OS APIs that bochs ends up calling are different in different OSes and they may not be sufficiently equivalent in terms of performance or ease of use, which may result in different user experience.
(Solved) Slow Bochs on Linux
Posted: Sat Feb 11, 2017 6:56 am
by Octacone
omarrx024 wrote:Talking from the point of view of someone who is doing OS development, this problem shouldn't need to be posted in a forum asking for help. Instead, you should have compared the bochsrc on Windows and Linux, and determined the problem yourself. All I did was compare your bochsrc with mine.
I guess so, but I couldn't compare it. Windows one was auto generated and had like 100 more options that I didn't need. It is all solved now. It is hard to haunt when you don't know what to haunt.