-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can we increase the amount of RAM from 2 Gb? #311
Comments
Where the 2GB comes from ? |
I cloned and built Bochs with the following commands:
I then launched bochs to set the RAM limits and got the following: Bochs output
My Bochs binary is 64 bit. fuzz@fuzz-pc:~/Desktop/Bochs/bochs$ file bochs
bochs: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=ddc9298b7b1ccb01a65f3c28b7dad3d39137b6b5, for GNU/Linux 3.2.0, not stripped I want to run a windows 10 guest and i want it to see 8gb of ram. |
Looks like limit is set here: Lines 864 to 869 in 58f4490
|
So use host = 2GB and guest as much as you want, even 16GB |
Okay, it's a bit confusing. I also want to provide the said amount of memory to the VM from host. |
@stlintel commented 3 hours ago:
Why do a user has the ability to change the memory used by "host" at all, please? I don't get the point. |
Why not ? |
Alright, but now we need to let the host give more than 2gb of RAM for emulation. Just like with other emulators such as VMware for example. |
@r3bb1t, the thing you mean about VMware is being set during the "Enter memory size (MB)" step, I guess. And the "Enter host memory size (MB)" step defines the amount used for emulation of the guest I/O devices (not to store/emulate the guest RAM). Have you tried running a guest with 16+2 GiBs and taking a look at the numbers shown by Windows Task Manager or Resource Monitor (Commit, Working Set, Shareable, Private) for your instance of |
@sskras Can you please provide me some .bochsrc config file example for windows? Setting up bochs and especially it's CPU option is very confusing for me. |
It's because the emulation is pretty slow (and pretty accurate) in comparison with other emulators. With Bochs, it's more about simulation than emulation – that's the reason, I guess.
That might be a second, different issue.
Excuse me please, I haven't tried running Windows on it yet. At least you should mention the Windows version.
CPU configuration might be another, probably the 3rd issue already. |
My bad, any windows 10 version is fine. |
Wrong. Absolutely wrong. BX_MEM(0)->init_memory(memSize, hostMemSize, memBlockSize); this is the only place the hostMemSize used for. BX_MEM_THIS vector = alloc_vector_aligned(host + BIOSROMSZ + EXROMSIZE + 4096, BX_MEM_VECTOR_ALIGN); guest RAM
Why ? These 16G would affect the amount memory Guest sees not the bochs.exe uses. |
Thank you for fixing my guess, but:
... can you explain that for a Bochs user in a simple English, please? :) For a user it's just hard to guess what does IOW, we the users see two different parts responsible for memory, but not the whole picture.
Because of my assumption that if Bochs guest allocates all 16 gigs, the user would see more than 2 gigs (and less than 19 gigs) allocated in the host OS by the emulation process. If @r3bb1t runs the guest really needing 16 gigs, then that would be observable from the host OS too. |
PS. OK @stlintel, now reading and trying to decipher a decade old answers from you and @vruppert: https://sourceforge.net/p/bochs/discussion/39592/thread/07aff11d/ OK, this seems to be more up to date:
So I circle back to the original question: How to run a guest that needs to have its' 16 GiB of RAM allocated successfully on a 64-bit host OS with enough of free memory? |
Just try to change the source code by overcoming limitation at: Lines 864 to 869 in 58f4490 bx_param_num_c *host_ramsize = new bx_param_num_c(ram, If it doesn't crash for you - we can make it into master. |
BTW, small extension. There is no FATAL PANIC anymore if configured and compiled with --enable-large-ramfile option (which should happen by default as well). With this option Bochs will never run out of memory, it will start managing its own private swap file to manage all the GBs of guest memory inside the host allocated memory.
Which will give you small increase in run speed, may be 1%-2% because swap file will be located entirely in host RAM. |
First of all, thank you very much for this state-of-art emulator. Honestly, it's one of my most admired pieces of software known to me.
I wonder why, since the beginning, we are unable to have more than 2gb of ram? It's too little for year 2024. I, personally want to emulate Windows 10 and do some research by using Bochs.
I both wonder why the RAM limit didn't get bigger and how can community contribute if needed?
The text was updated successfully, but these errors were encountered: