HIGH-PERFORMANCE SAS TARGET
A method for data storage includes, in a storage device that communicates with a host over a storage interface for executing a storage command in a memory of the storage device, estimating an expected data under-run between fetching data for the storage command from the memory and sending the data over the storage interface. A data size to be prefetched from the memory, in order to complete uninterrupted execution of the storage command, is calculated in the storage device based on the estimated data under-run. The storage command is executed in the memory while prefetching from the memory data of at least the calculated data size.
1 . A method for data storage, comprising:
in a storage device that communicates with a host over a storage interface for executing a storage command in a memory of the storage device, estimating an expected data under-run between fetching data for the storage command from the memory and sending the data over the storage interface;
calculating in the storage device, based on the estimated data under-run, a data size to be prefetched from the memory in order to complete uninterrupted execution of the storage command; and
executing the storage command in the memory while prefetching from the memory data of at least the calculated data size.
2 . The method according to claim 1 , wherein the storage command is received in accordance with a Serial Attached Storage (SAS) storage protocol.
3 . The method according to claim 1 , wherein the storage device comprises a Solid State Disk (SSD).
4 . The method according to claim 1 , wherein executing the storage command comprises transferring the data from the storage device to the host, and wherein calculating the data size comprises determining the minimal data size that causes the data to be transferred in successive time slots.
5 . The method according to claim 1 , wherein executing the storage command comprises transferring the data from the storage device to the host, and comprising re-transmitting the data to the host upon a failure to transfer the data successfully using the calculated data size.
6 . The method according to claim 1 , wherein calculating the data size comprises setting the data size depending on a type of the memory from which the data is fetched.
7 . A data storage apparatus, comprising:
an interface, which is arranged to communicate with a host over a storage interface for executing a storage command in a memory of the apparatus; and
storage circuitry, which is arranged to estimate an expected data under-run between fetching data for the storage command from the memory and sending the data over the storage interface, to calculate, based on the estimated data under-run, a data size to be prefetched from the memory in order to complete uninterrupted execution of the storage command, and to execute the storage command in the memory while prefetching from the memory data of at least the calculated data size.
8 . The apparatus according to claim 7 , wherein the storage command conforms to a Serial Attached Storage (SAS) storage protocol.
9 . The apparatus according to claim 7 , wherein the interface, the storage circuitry and the memory are comprised in a Solid State Disk (SSD).
10 . The apparatus according to claim 7 , wherein the storage circuitry is arranged to execute the storage command by transferring the data to the host, and to calculate the data size by determining the minimal data size that causes the data to be transferred in successive time slots.
11 . The apparatus according to claim 7 , wherein the storage circuitry is arranged to execute the storage command by transferring the data to the host, and to re-transmit the data to the host upon a failure to transfer the data successfully using the calculated data size.
12 . The apparatus according to claim 7 , wherein the storage circuitry is arranged to set the data size depending on a type of the memory from which the data is fetched.
13 . A method for data storage, comprising:
in a storage device that executes storage commands in a memory of the storage device, maintaining a hash table that stores tags of active connections and is accessed by hash values that are produced by applying a hash function to the tags extracted from received storage commands, wherein the hash table comprises entries holding one or more of the tags associated with the respective hash values;
receiving in the storage device a storage command that is associated with a new connection and comprises a tag of the new connection;
applying the hash function to the tag so as to produce a hash value;
performing a lookup in the hash table using the hash value; and
upon detecting that the tag of the new connection matches one of the tags in an entry of the hash table associated with the hash value, outputting an indication that the new connection has a duplicate tag with an existing active connection.
14 . The method according to claim 13 , wherein the storage command and the connection conform to a Serial Attached Storage (SAS) storage protocol.
15 . The method according to claim 13 , wherein the storage device comprises a Solid State Disk (SSD).
16 . The method according to claim 13 , wherein each of the entries in the hash table holds no more than a predefined number, N, of the tags, and comprising declining the new connection upon detecting that all the N tags in the entry associated with the hash value are already occupied.
17 . The method according to claim 13 , wherein declining the new connection comprises sending a declination message to a host that initiated the storage command.
18 . The method according to claim 17 , wherein sending the declination message comprises sending a Serial Attached Storage (SAS) “task set full” message.
19 . A data storage apparatus, comprising:
an interface, which is arranged to receive storage commands for execution in a memory of the apparatus; and
storage circuitry, which is arranged to maintain a hash table that stores tags of active connections and is accessed by hash values produced by applying a hash function to the tags extracted from received storage commands, wherein the hash table comprises entries holding one or more of the tags associated with the respective hash values, to receive via the interface a storage command that is associated with a new connection and comprises a tag of the new connection, to apply the hash function to the tag so as to produce a hash value, to perform a lookup in the hash table using the hash value, and, upon detecting that the tag of the new connection matches one of the tags in an entry of the hash table associated with the hash value, to output an indication that the new connection has a duplicate tag with an existing active connection.
20 . The apparatus according to claim 19 , wherein the storage command and the connection conform to a Serial Attached Storage (SAS) storage protocol.
21 . The apparatus according to claim 19 , wherein the interface, the storage circuitry and the memory are comprised in a Solid State Disk (SSD).
22 . The apparatus according to claim 19 , wherein each of the entries in the hash table holds no more than a predefined number, N, of the tags, and wherein the storage circuitry is arranged to decline the new connection upon detecting that all the N tags in the entry associated with the hash value are already occupied.
23 . The apparatus according to claim 19 , wherein the storage circuitry is arranged to decline the new connection by sending a declination message to a host that initiated the storage command.
24 . The apparatus according to claim 23 , wherein the declination message comprises a Serial Attached Storage (SAS) “task set full” message.