Devices connected to WiFi become sluggish to load data (R7800)

You can set Dtim via luci, it is in the Advanced settings tab of the wifi interface. I also bump the group rekey interval (GTK) to one day (86400), as some combo's of WRT drivers and mobile OSs (looking at you, Android) work better if rekeys are spread apart.

Here is a well documented article on exactly why the DTIM needs to be raised:

In the Ubiquity forums, some guys recommend DTIM 6 on 2.4 and 3 on 5GHz. But I find 3 on both is just fine.