2. Emmanuel Lécharny
Apache Software Foundation member
Chairman of MINA project
PMC of Apache Directory Project
IKTEK Owner (www.iktek.com)
www.iktek@com, elecharny@iktek.com
3. Latency numbers
every programmer should know !
(https://gist.github.com/hellerbarde/2843375)
Main memory reference ...................... 100 ns
Read 1 MB sequentially from memory ..... 250,000 ns
= 250 µs
Read 1 MB sequentially from SSD* ..... 1,000,000 ns
=
1 ms
Send 1 MB over 1 Gbps network ....... 10,000,000 ns
=
10 ms
Disk seek ........................... 10,000,000 ns
=
10 ms
Read 1 MB sequentially from disk .... 20,000,000 ns
=
20 ms
3
11. Search Request Checks
Checks done before the first entry is returned :
- Normalize the filter
- Check if the password should be reset
- Check if the user is authenticated
- Check the filter attributes
- Find the backend
This represents 9% of the initial
search processing
(for a search returning one entry).
11
22. Reminder
Disk is from 4x to 80x slower !
Read 1 MB sequentially from memory ..... 250,000 ns
= 250 µs
Read 1 MB sequentially from SSD* ..... 1,000,000 ns
=
1 ms
Read 1 MB sequentially from disk .... 20,000,000 ns
=
20 ms
39. Network
It's 4x to 40x times slower than memory :
Read 1 MB sequentially from memory ..... 250,000 ns
= 250 µs
Read 1 MB sequentially from SSD* ..... 1,000,000 ns
=
1 ms
Send 1 MB over 1 Gbps network ....... 10,000,000 ns
=
10 ms
But still : you can send up to 100 000 1kb entries per second
Through 1Gbps network...