Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jul 2011 11:55:04 +1000
From:      "Peter Ross" <Peter.Ross@bogen.in-berlin.de>
To:        "Adam Vande More" <amvandemore@gmail.com>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: Network problems while running VirtualBox
Message-ID:  <20110714115504.20182xr8y5z7o3ug@webmail.in-berlin.de>
In-Reply-To: <CA%2BtpaK3KXivGBEXxQQPPgUj0Ptt3Gadd%2BK2BT0Xg74RDfb42kA@mail.gmail.com>
References:  <20110714095717.35581xj4rdju1pel@webmail.in-berlin.de> <CA%2BtpaK3KXivGBEXxQQPPgUj0Ptt3Gadd%2BK2BT0Xg74RDfb42kA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoting "Adam Vande More" <amvandemore@gmail.com>:

> On Wed, Jul 13, 2011 at 6:57 PM, Peter Ross
> <Peter.Ross@bogen.in-berlin.de>wrote:
>
>> Hi all,
>>
>> I have a problem with the network while running VirtualBox.
>>
>> As soon as I _run_ a VirtualBox I am not able to copy large files (e.g.
>> virtual disks or ZFS snapshots) using ssh/scp to another machine.
>>
>> The ssh crashes with "Write failed: Cannot allocate memory"
>> <snip>
>> At the moment it is a real showstopper for running VirtualBox/FreeBSD
>> production because I cannot backup VirtualBoxes. Mahlon gave up on it and
>> uses Citrix by now (but is still keen to have this solved).
>>
>> Any idea what causes the problem? I am happy to gather information,
>> applying patches etc. if it helps.
>>
>
> Just a thought, does using ssh from ports make any difference?

I am running named on the same box. I have overtime some errors there as wel=
l:

Apr 13 05:17:41 bind named[23534]: internal_send: =20
192.168.50.145#65176: Cannot allocate memory
Jun 21 23:30:44 bind named[39864]: internal_send: =20
192.168.50.251#36155: Cannot allocate memory
Jun 24 15:28:00 bind named[39864]: internal_send: =20
192.168.50.251#28651: Cannot allocate memory
Jun 28 12:57:52 bind named[2462]: internal_send: 192.168.165.154#1201: =20
Cannot allocate memory
Jul 13 19:43:05 bind named[4032]: internal_send: =20
192.168.167.147#52736: Cannot allocate memory

coming from a sendmsg(2).

My theory there is: my scp sends a lot data at the same time while the =20
named is sending a lot of data over time - both increasing the =20
likelyhood of the error.

>  Do you have
> any more info about the threshold of file size for when this problem start=
s
> occurring?  is it always the same?

No, it varies. Usually after a few GB. E.g. he last one lasted 11GB =20
but I had failures below 8GB transfer before.

The system itself is quite stable regarding running processes and =20
memory usage otherwise, here the description of it:

This machine is running:

- DHCP server (host)
- NTP server (host)
- Nagios monitor (nagios jail)
- DNS server (bind jail)
- MySQL server (mysql jail)
- Apache server with ITWiki (apache jail)
- Admin mail server (adminmail jail)
- Zimbra 7.0 Mail server (zimbra VirtualBox)

The machine has 8GB of RAM, and the footprint of the jails is minimal =20
(the MySQL server is for the mediawiki only which is used by two =20
people at the moment and not heavily).

Here a top(1) sorted by size:

last pid: 30169;  load averages:  0.38,  0.41,  0.41    up 8+19:04:43  =20
11:51:39
159 processes: 1 running, 158 sleeping
CPU:  0.4% user,  0.0% nice,  0.4% system,  0.0% interrupt, 99.2% idle
Mem: 84M Active, 356M Inact, 4516M Wired, 1004K Cache, 33M Buf, 2943M Free
Swap: 8188M Total, 8188M Free

   PID USERNAME    THR PRI NICE   SIZE    RES STATE   C   TIME   WCPU COMMAN=
D
92688 root         24  44    0  2078M  1991M IPRT S  8  18.3H  5.86% =20
VBoxHeadle
  4768     88       16  51    0   213M 21672K sigwai  8   2:02  0.00% mysqld
57180 www           1  46    0   140M 10344K accept  3   0:00  0.00% httpd
  6223 www           1  76    0   139M  2400K accept 14   0:09  0.00% httpd
78674 www           1  44    0   138M 27056K accept  9   0:02  0.00% httpd
78924 www           1  44    0   138M 25928K accept  8   0:02  0.00% httpd
36114 www           1  44    0   138M 25424K accept  2   0:01  0.00% httpd
  3997 www           1  44    0   138M 25180K accept  1   0:00  0.00% httpd
57410 www           1  44    0   138M 24476K accept  8   0:01  0.00% httpd
48202 www           1  44    0   138M 18488K accept 10   0:00  0.00% httpd
29695 www           1  44    0   134M  4920K accept  8   0:00  0.00% httpd

> EG if Vbox has 2 GB mapped out and you
> get an error at a certain file size, does reducing the Vbox memory footpri=
nt
> allow a larger file to be successfully sent?

Given that the amount of data is randomly just now I cannot imagine =20
how to get reliable numbers in this experiment.

While I am doing it I monitored the memory usage using top and vmstat =20
but there does not seem to be a shortage.

I also tried lookbusy to occupy 2GB when VisualBox wasn't running. I =20
even put slightly more pressure on it as VirtualBox does (that means =20
the free memory was below the typical numbers when VirtualBox was =20
running) - but the result is the same:

It works as long as I do not start the VirtualBox.

Regards
Peter




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110714115504.20182xr8y5z7o3ug>