VirtualBox

Opened 14 years ago

Closed 8 years ago

#7431 closed enhancement (obsolete)

With 2 GB guest RAM VirtualBox is twenty times slower than with 700 MB RAM

Reported by: Jaan Owned by:
Component: other Version: VirtualBox 3.2.8
Keywords: Cc:
Guest type: other Host type: other

Description (last modified by aeichner)

Steps to reproduce:

  1. Download Ubuntu 10.04 32-bit Live CD ISO
  2. Create a virtual machine with 2048 MB RAM and that ISO as CD-ROM and no hard drive
  3. Run the virtual machine
  4. Run "sudo apt-get install openjdk-6-jdk" on the guest to install Java
  5. Copy the file SerTest.java (in attachment) to the guest's home directory
  6. Run the following commands on the guest:
    javac SerTest.java
    java SerTest 1000 100 0
    

I get output like this:

Creating 1000 objects... Done in 0.026094316000000003 seconds.
Writing to test.ser... Done in 0.23731131500000002 seconds.
Reading from test.ser... Done in 7.03051558 seconds.
Checksum: -406759103

The 7 seconds for reading the file is an enormously long time.

If I change the virtual machine's RAM size to 700 MB and and repeat points 3-6 then I get the following, much better time:

Creating 1000 objects... Done in 0.017042552000000002 seconds.
Writing to test.ser... Done in 0.11916187800000001 seconds.
Reading from test.ser... Done in 0.36389537600000005 seconds.
Checksum: -884318403

Increasing the object count in the test program increases run time proportionally, e. g. for "java SerTest 10000 100 0" the times are 70 seconds and 3 seconds for 2 GB RAM and 700 MB RAM, respectively.

The host is 64-bit Windows 7 with 4 GB RAM and Intel Core2 Duo E6400 processor.

Attachments (3)

SerTest.java (2.3 KB ) - added by Jaan 14 years ago.
the benchmark program
VBox.log.3.2048M (71.1 KB ) - added by Jaan 14 years ago.
VBox.log with 2 GB guest RAM
VBox.log.2.700M (71.3 KB ) - added by Jaan 14 years ago.
VBox.log with 700 MB guest RAM

Download all attachments as: .zip

Change History (8)

by Jaan, 14 years ago

Attachment: SerTest.java added

the benchmark program

by Jaan, 14 years ago

Attachment: VBox.log.3.2048M added

VBox.log with 2 GB guest RAM

by Jaan, 14 years ago

Attachment: VBox.log.2.700M added

VBox.log with 700 MB guest RAM

comment:1 by Jaan, 14 years ago

The formatting is not what I expected... but I hope the description is readable. Point 6 should read:

  1. Run the following commands on the guest:
    javac SerTest.java
    java SerTest 1000 100 0
    

comment:2 by Jaan, 14 years ago

I filed this as an enhancement, not defect because VirtualBox did not crash, it was only very slow on a specific task. The enhancement would be to improve the performance to, say, no more than two times slower than native (less would be even better, of course). At least for VirtualPC, 2 GB guest RAM is not such a problem.

The time is spent on CPU (100% CPU usage on guest and 50%, i. e. 100% of one core on host).

comment:3 by Frank Mehnert, 14 years ago

Description: modified (diff)

comment:4 by Frank Mehnert, 14 years ago

Thank you for this report and for the test case. We were able to reproduce this issue and are currently investigating. So far it seems that this slowdown happens with 32-bit guests only. And this can be explained because Linux has to do some more complex operations to access memory beyond the low memory (which is normally ~1GB). Of course, the additional overhead shouldn't be that big.

comment:5 by aeichner, 8 years ago

Description: modified (diff)
Resolution: obsolete
Status: newclosed

Please reopen if still relevant with a recent VirtualBox release.

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette