I have a L2 address table (MAC to port mapping) which contains 20,000 entries. Address table is implemented using hash table. Now I need aging timer(s) for finding stale entries to make room for newly learned MAC addresses. I used to have a single timer which will periodically check 10,000 entries at each timeout event (entries 1-10,000 in one pass & next 10,000 in another pass).
Now the L2 address table size is extended to 150,000. With this increased size, I do see my current timer implementation is not efficient & at the same time I donot want to have too many timers for handling these stale entries...
Is there any better timer design approach which will help me to get an efficient search (of aged entries)?