williams is pretty expensive next season (cap $6m+).
Once again, for like the millionth time, cap cost is not the relevant number. The $4.75 mil in cap saving if cut him is the relevant number. The choice is simple: you can have Williams or $4.75 mil in extra cap to work with. The $6.4 mil cap number doesn't enter into it.
Perry's $14.4 mil cap number is irrelvant. It's the $3.3 mil in cap savings that is relevant in a one year time frame. You can have Perry or you can have $3.3 mil in extra cap.
Cap numbers are only useful for looking backward in saying, for example, "that Perry contract was terrible". It doesn't say anything about where you're going.
Now, in order to capture all of those savings these guys have to cut within 3 or 4 days of the start of the league year on March 12, 2019 which is also the start of free agency. They have signing bonuses due at that time. So, those decisions need to be made before FA is but a couple of days old and long before the draft.
With Perry, if you wait to cut him after his $5.4 mil roster bonus comes due, then the cap savings goes negative. Williams cap savings is reduced by $1 mil if you wait. Throw Graham into the mix; his cap savings drops from $5.3 mil to zero if he's cut after the 4th. day of the league year. What this means is that the keep-or-dump decisions will be made before those signing bonuses come due, before the second wave of FA where the less than very high cost replacements might be found, and before the draft .
Some decisions get simpler if you don't assume a "win now" approach. Perry might be worth that $3.3 mil in savings which doesn't even buy a respectable rotational edge player, but the cost for that single 2019 season jumps once you have to pay that $5.3 mil roster bonus and at that point you are committed to him for the year, come hell or high water, because cutting him after that costs you cap instead of saving it.