Information processing apparatus, control method, and computer-readable recording medium storing control program capable of suppressing performance degradation when updating counter value of route information
An information processing apparatus includes a memory in which route information in flow control is stored, and in which flows that include a same ROW address as access destinations are grouped and stored when counter values managed in the route information are updated, and a processor coupled to the memory and configured to rearrange an order of a plurality of flows and access the memory consecutively for the plurality of flows that include the same ROW address as access destinations to update the counter values.
1 . An information processing apparatus comprising:
a memory in which route information in flow control is stored, and in which a plurality of flows that include a same ROW address as access destinations are stored in correspondence with the same ROW address, thereby the plurality of flows is stored as a single group when counter values managed in the route information are updated; and
a processor coupled to the memory and configured to:
control such that the plurality of flows with the same ROW address are processed consecutively by rearranging an order of the plurality of flows,
increment a counter configured to count a number of consecutive flows that include the same ROW address as access destinations; and
reduce a number of times of switching of the ROW address for the memory by accessing the memory consecutively for the plurality of flows that include the same ROW address as the access destinations to update the counter values.
2 . The information processing apparatus according to claim 1 , wherein the processor is further configured to:
when detecting the consecutive flows that include the same ROW address as access destinations while requesting for reading of the counter value to the route information,
decrement the counter when detecting responses for consecutive flows that include the same ROW address as access destinations while receiving a response of the counter value from the route information, and
stall a memory access to the memory for the flows when the counter takes a value other than 0.
3 . The information processing apparatus according to claim 2 , wherein the counter value indicates a number of times packets having the same route information arrive, and
the processor is further configured to create a counter update value by adding the counter value corresponding to a packet to be processed to the counter value read from a flow table that is used as the route information expressing a transfer route of the packet.
4 . A control method comprising:
storing route information in flow control into a memory;
by storing a plurality of flows that include a same ROW address as access destinations in correspondence with the same ROW address, storing the plurality of flows as a single group when counter values managed in the route information are updated into the memory;
controlling such that the plurality of flows with the same ROW address are processed consecutively by rearranging an order of the plurality of flows; and
incrementing a counter configured to count a number of consecutive flows that include the same ROW address as access destinations;
reducing a number of times of switching of the ROW address for the memory by accessing the memory consecutively for the plurality of flows that include the same ROW address as access destinations to update the counter values, by a processor.
5 . The control method according to claim 4 , further comprising:
when detecting the consecutive flows that include the same ROW address as access destinations while requesting for reading of the counter value to the route information,
decrementing the counter when detecting responses for consecutive flows that include the same ROW address as access destinations while receiving a response of the counter value from the route information, and
stalling a memory access to the memory for the flows when the counter takes a value other than 0.
6 . The control method according to claim 5 , wherein the counter value indicates a number of times packets having the same route information arrive, and
further comprising creating a counter update value by adding the counter value corresponding to a packet to be processed to the counter value read from a flow table that is used as the route information expressing a transfer route of the packet.
7 . A non-transitory computer-readable recording medium storing a control program that causes a computer to execute a process, the process comprising:
storing route information in flow control into a memory;
by storing a plurality of flows that include a same ROW address as access destinations in correspondence with the same ROW address, storing the plurality of flows as a single group when counter values managed in the route information are updated into the memory;
controlling such that the plurality of flows with the same ROW address are processed consecutively by rearranging an order of the plurality of flows;
incrementing a counter configured to count a number of consecutive flows that include the same ROW address as access destinations, and
reducing a number of times of switching of the ROW address for the memory by accessing the memory consecutively for the plurality of flows that include the same ROW address as access destinations to update the counter values.
8 . The non-transitory computer-readable recording medium according to claim 7 , further comprising:
when detecting the consecutive flows that include the same ROW address as access destinations while requesting for reading of the counter value to the route information,
decrementing the counter when detecting responses for consecutive flows that include the same ROW address as access destinations while receiving a response of the counter value from the route information, and
stalling a memory access to the memory for the flows when the counter takes a value other than 0.
9 . The non-transitory computer-readable recording medium according to claim 8 , wherein the counter value indicates a number of times packets having the same route information arrive, and
further comprising creating a counter update value by adding the counter value corresponding to a packet to be processed to the counter value read from a flow table that is used as the route information expressing a transfer route of the packet.