High cpu usage

I installed ROS box on VMware Workstation. The ROS box is configured with 1 vCPU (2 cores), 512MB memory. But its cpu usage is high, >40%, even there is not much traffics.

The profiled cpu, and see one ‘ethernet’ uses >40% CPU usage, and the other ‘ethernet’ uses 5%.

Is there any way to optimize cpu usage?

what physical NICs are you using?

What type of virtual nic are you using?

Physical NIC is normal embedded Giga Bytes nic.

I tried E1000 and E1000E for virtual nic type. I haven’t figured out how to install vmtools on ROS, thus have no way to try with vmxnet3.

certain NICs have been known to cause higher CPU usage with virtualisation and routing. There are many different onboard NIC brands as well. Also if the virtualisation uses its own virtual NIC that can add to the overhead as well.

I just checked that the physical NIC is Intel (R) 82576 Gigabit Dual Port Network Connection. Is it a known issue NIC?

it shouldnt be. Can routerOS directly access the NIC or is there some virtual NIC in between?

ROS is installed in a VMware Workstation virtual machine. So there is virtual NIC on VM, ROS should access virtual NIC. As I mentioned, I tried E1000E and E1000 for virtual NIC type.

VMware is capable of allowing VMs access to the hardware itself. that may be a better option but mikrotik may not work with that because of drivers.

if you use 2 virtual NICs make sure that they arent capable of seeing each other. It could be internal traffic between the NICs physical and virtual or within the virtual NICs themselves. If you can set up some sort of layer 1 segmentation or perhaps even vlans as well that may help too if the vlans are applied on vmware rather.

This may explain you CPU usage. E1000 and E1000E has much more CPU overhead then VMXNET3.
Can you try to use a CHR with VMXNET3 and see if this will give you better reaults?