This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[test] | |
fn iter_demo() { | |
let v1 = vec![1, 2, 3]; | |
let mut v1_iter = v1.iter(); | |
// iter() returns an iterator of slices. | |
assert_eq!(v1_iter.next(), Some(&1)); | |
assert_eq!(v1_iter.next(), Some(&2)); | |
assert_eq!(v1_iter.next(), Some(&3)); | |
assert_eq!(v1_iter.next(), None); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Server 2 sockets,6 cores each, 2.4ghz | |
# Set ixgbe options | |
# Limit RSS queues to the number of physical cores per cpu | |
# Disable offload | |
# When you change this, you need to run the command and reboot for it to take. | |
echo "options ixgbe LRO=0,0 MQ=1,1 RSS=6,6 VMDQ=0,0 vxlan_rx=0,0" > /etc/modprobe.d/ixgbe.conf | |
# Shut down HT cores | |
for i in $(seq 1 2 23); do |