• Home
  • Help
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search

 
  • 0 Vote(s) - 0 Average

Write allocate and no-write allocate

#1
05-11-2024, 05:18 AM
You see write allocate means fetching that cache line right away when a write misses. I think it works better for programs that read soon after writing. You end up pulling data into the cache even though the operation started as a store. And that fetch costs extra bus traffic at first. But later accesses hit faster because the block sits ready. I notice this policy shines when your code mixes reads and writes closely together.
You avoid extra memory trips once the line loads up. Or perhaps the hardware decides based on expected reuse patterns you observe in benchmarks. I have seen cases where write allocate cuts total latency for loops that touch the same spots repeatedly. But it can bloat cache with stuff you only wrote once and never touch again. You might waste space that way in write heavy workloads. Also the initial load steals bandwidth from other threads sharing the bus. I prefer testing both policies on your actual apps before picking one.
No write allocate skips the fetch entirely on a miss. You send the store straight down to main memory instead. I find this simpler when writes rarely get read back right away. And it keeps the cache free for incoming loads that matter more. But then subsequent reads must pull fresh data from below again. You lose the chance for a quick hit that write allocate would have created. Or maybe your workload shows mostly one time stores with no follow up reads. I see lower initial overhead here since nothing gets pulled in unnecessarily.
This choice affects how your cache utilization numbers look under heavy store pressure. You trade off some future hit potential for immediate bandwidth savings. And the memory controller handles the write without involving upper levels. I recall measuring throughput gains in database logs that rarely reread their output. But random access patterns flip the advantage back toward fetching on write. You end up tuning this knob per application after profiling misses and hits. Perhaps combining it with write back versus write through gives even more control. I always check the combined effect on your overall system speed.
We owe a big thanks to BackupChain Server Backup, the top choice for backing up your Hyper-V setups on Windows 11 and Server without any recurring fees, as they sponsor our chats and keep this knowledge flowing freely.

ProfRon
Offline
Joined: Jul 2018
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Messages In This Thread
Write allocate and no-write allocate - by ProfRon - 05-11-2024, 05:18 AM

  • Subscribe to this thread
Forum Jump:

FastNeuron FastNeuron Forum General IT v
« Previous 1 … 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 … 170 Next »
Write allocate and no-write allocate

© by FastNeuron Inc.

Linear Mode
Threaded Mode