I run a virtual copy of Debian on VirtualBox to develop a larger-sized PHP application on a nginx/php5-fpm/MySQL stack. Development happens in the host OS (Windows 7 x64), the code is mounted as a shared folder in the guest OS.
Performance is very bad. The following are webgrind outputs for the native vbox filesystem and a samba mount with cifs:


In either case filemtime, file_exists and is_readable take several seconds to run. CPU load is very high, memory usage seems normal.
Isn’t the output of all three of these functions cached in the stat cache? Why are they taking so long?
I’d really appreciate any help I can get!
Edit: To clarify, production performance is fine. On our (proper, non-virtual) staging server the PHP code executes in ~60ms max in production settings and somewhere between 100-200ms in dev mode.
I need help figuring out why VirtualBox is 100x slower in dev & prod mode.
I just checked, production settings yield ~5sec execution. Still unusable, plus it’s awkward to develop with.
Use nfs file sharing. Samba and the vbox file share can be very slow.
Your profiling indicates that file system operations are the bottleneck.
Read this blog post http://clock.co.uk/tech-blogs/virtualbox-404-shared-folder-update for more insight