Hi Huawei, <snip>
> > > I don't think that's a right "correction": vhost-swtich would fail > > > to > > > start: > > > > > > EAL: Error - exiting with code: 1 > > > Cause: Cannot create mbuf pool > > > > > > As vhost-switch creates more mbuf than 1024M can hold. > > > > > > However, I do think that adding this option is necessary, otherwise, > > > all hugepages will be allocated to vhost-switch, leaving no memory > > > for > > starting > > > VM at all. (And this is kind of informatin you need to put into > > > commit > > log). > > > > > > And limiting it to "1024M" is reasonable as well, so that we can run > > > it > > on a > > > desktop (or laptop) without too many memories. You just need fix > > > vhost- switch example to not allocate too many mbufs by default. > > > > > > --yliu > > > > Yes the --socket-mem <number> option is necessary. > > I will add a note that a value of <number> may need to be greater > > than 1024. > > I will submit a patch to vhost-switch to reduce the number of mbufs. > > > I recall we have to allocate mbufs for each queue rather than used queues > only, so memory consumption depends on queue number. After that issue is > fixed, I think 1024MB is enough. For the time being, you could temporarily > use 2048M and add an explanation. > I have sent a v3 of this patch which includes a note that the value of 1024 may have to be increased. I would prefer to keep the value of 1024. Regards, Bernard.