NEXTCLOUD - VIRTUALBOX - High I/O causing filesystem corruption and guest crash

From years for little exigence, I use cloud solution on a vitualbox machine, that write data on a virtualbox shared folder. 3-4 users with 50GB each and thousands of file. All ok. Actually I passed to debian 9, last nexcloud version where seems that the sync speed from clients is implemented and I have continuous system crash (guest nextcloud machine) just when I upload data to sync.

After a long search I found this:

Blockquote

michaln wrote:
One of the most important answers is right there - if you’re on a Linux host and doing heavy disk I/O, do not use the host cache for the VMs, ever. The Linux I/O subsystem not very smart, it batches gobs of dirty pages in the filesystem cache, and when it runs out of free memory, flushes out everything to disk. That can take quite a long time (minutes) and there’s nothing VirtualBox can do about it.
https://forums.virtualbox.org/viewtopic.php?f=3&t=46722&p=413949#p413949

Blockquote

What can I do, to limit the write speed on disk in nextcloud? Who found solutions for this?

Details of the issue here:

Reading the links you provide, I would suggest to try disabling “Use host I/O cache” for your VirtualBox disk controller and/or switch to SATA in case.

VBoxManage storagectl "VM name" --name <controllername> --hostiocache off

Also it might be (additionally or alternatively) necessary to increase your guests memory or do some analyse and lower memory usage by some services.

Hi, thanks for help. ‘Use host I/O cache’ already disabled. No problem with controller because I write in a virtual box shared folder. Actually I passed from 4 to 2 and to 1 processor. Took out I/O APIC. Seems better. Not clear yet if the processor number can solve the issue (have a 64bit system). I have impression is something connected to virtualbox, sure something not normal. I’m sure of the issue because same problem on owncloud / nextcloud / virtualbox 5.1.x 5.2 … just on intense file upload.

I reduced virtualbox processor to 1, take out I/O PIC set and now work perfect after 2 months of tests!