Single process
Redis single process model, to handle client requests, by wrapping the Epoll function, the actual processing speed of Redis relies entirely on the execution efficiency of the process. Epoll, the Linux kernel's improved epoll for handling large-volume file descriptors, is an enhanced version of Linux under Multiplexing, IO interface select/poll, which significantly improves system CPU utilization in a large number of concurrent connections with only a few active cases Redis default of 16 databases
Redis defaults to 16 of the database, similar to arrays, subscript from 0 onwards to 15, you can find the corresponding description from the redis.conf configuration file as shown below.
It also tells us that the default warehouse is library NO. 0, switch Warehouse use command select dbid
Redis in the terminal has automatic completion of the function, input sel press TAB will be automatically complete and uppercase, as shown above, we switch the library number 16 when the error, prompt overflow. View the number of keys
You can view the number of keys for the current library by using the following command
Dbsize
Through the command keys * see that there are really two keys emptied of the current warehouse and all warehouses
Empty the current warehouse, the current warehouse No. 0 has two pairs of key-value pairs, we then create two key-value pairs in the 3rd library.
And then use the instructions under library 3rd,
Flushdb
Clear Library 3rd Data
Then set the K1 and K2 in the 3rd library to delete all
Using directives
Flushall
You can see that we used Flushall under library 3rd and switched back to library No. 0, and the data for library No. 0 was cleared.