Changes between Initial Version and Version 1 of Benchmarks_JumboFrames


Ignore:
Timestamp:
Aug 22, 2013, 3:55:50 PM (11 years ago)
Author:
welsh
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Benchmarks_JumboFrames

    v1 v1  
     1= Benchmark:  Jumbo Frames =
     2
     3WARPLab 7 supports "jumbo frames," which are Ethernet packets larger than 1500 bytes. WARPLab 7 supports packet sizes up to 9014 bytes long. The benefit of longer packets is that fewer packet exchanges are required in the burst of transmissions that occur when reading or writing large numbers of samples. On our computers, jumbo packets improve the speed for the [wiki:WARPLab/Reference/Commands/Baseband#read_iq read_IQ] and [wiki:WARPLab/Reference/Commands/Baseband#write_iq write_IQ] commands significantly:
     4
     5[[Image(jumbo_char.png,width=600)]]
     6
     7This plot shows the amount of time each command takes to read or write a full 32768 (2^15^) samples to a buffer. The WARPLab 7 script used to generate the above plot is provided here:
     8
     9{{{
     10clear node
     11node = wl_initNodes(1);
     12[RFA,RFB] = wl_getInterfaceIDs(node);
     13
     14NUMITER = 100;
     15
     16NUMLENGTHS = 6;
     17maxPayloadVec = [1000,floor(linspace(1470,double(node.transport.maxPayload),NUMLENGTHS-1))];
     18
     19IQvec = complex(randn(node.baseband.txIQLen,1),randn(node.baseband.txIQLen,1));
     20IQvec = IQvec./(max(abs(IQvec)));
     21
     22duration_write = zeros(NUMITER,NUMLENGTHS);
     23duration_read = zeros(NUMITER,NUMLENGTHS);
     24mean_duration_write = zeros(1,NUMLENGTHS);
     25std_duration_write = zeros(1,NUMLENGTHS);
     26mean_duration_read = zeros(1,NUMLENGTHS);
     27std_duration_read = zeros(1,NUMLENGTHS);
     28for k = NUMLENGTHS:-1:1
     29    fprintf('Current maxPayload: %d\n',maxPayloadVec(k));
     30    node.transport.maxPayload = maxPayloadVec(k);
     31    for m = NUMITER:-1:1
     32        currTime = tic;
     33        wl_basebandCmd(node,RFA,'write_IQ',IQvec);
     34        duration_write(m,k) = toc(currTime);
     35        currTime = tic;
     36        wl_basebandCmd(node,RFA,'read_IQ',0,node.baseband.rxIQLen);
     37        duration_read(m,k) = toc(currTime);
     38    end
     39    mean_duration_write(k) = mean(duration_write(:,k));
     40    std_duration_write(k) = std(duration_write(:,k));
     41    mean_duration_read(k) = mean(duration_read(:,k));
     42    std_duration_read(k) = std(duration_read(:,k));
     43end
     44
     45%% Plotting
     46figure(1);clf
     47errorbar(maxPayloadVec,mean_duration_write,std_duration_write,'LineWidth',2)
     48hold on
     49errorbar(maxPayloadVec,mean_duration_read,std_duration_read,'r','LineWidth',2)
     50grid on
     51xlabel('Payload Size')
     52ylabel('Duration (Seconds)')
     53title('Duration of Commands vs Payload Size')
     54legend('write_IQ','read_IQ')
     55myAxis = axis;
     56myAxis(3) = 0;
     57axis(myAxis);
     58
     59standardPayload = 1470;
     60H = line([standardPayload standardPayload],[myAxis(3),myAxis(4)]);
     61set(H,'Color',[0 0 0])
     62set(H,'LineWidth',2)
     63H = text(standardPayload + .01*myAxis(2),.9*myAxis(4),'Standard Payload Size');
     64set(H,'FontName','Ariel')
     65set(H,'FontWeight','bold')
     66hold off
     67
     68}}}