|Walt Mankowski on 16 Apr 2015 08:45:00 -0700|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: [PLUG] swappiness and ssd|
On Thu, Apr 16, 2015 at 11:07:25AM -0400, Rich Freeman wrote: > On Apr 16, 2015 10:42 AM, "Walt Mankowski" <firstname.lastname@example.org> wrote: > > > > On Thu, Apr 16, 2015 at 10:01:55AM -0400, K.S. Bhaskar wrote: > > > The default swappiness on Ubuntu systems is 60, and presumably takes > into > > > consideration the relative performance of writes to and reads from the > swap > > > file / partition. The ratio of write performance to read performance > would > > > be higher for SSDs than rotating media, since SSD reads are truly random > > > whereas writes are in pages (in rotating media, seek and latency times > > > would tend to apply to both). Therefore, it seems to me that if swap is > > > located on SSD, we should increase swappiness, to encourage less > frequently > > > used pages to be written out, since they can be brought back in very > fast > > > when needed. Does that seem reasonable or am I missing something? > Thanks. > > > > I'm not sure why you think that SSD reads are "truly random". First, > > many reads will be buffered, so you'll still be reading in pages at a > > time instead of bytes at a time. Also, keep in mind the kernel is in > > the way of all your reads. It can cache frequently accessed data, and > > also reorder reads so that they're performed more efficiently. > > Wouldn't caching the page file be a bit counterproductive? That is an excellent point that I hadn't considered. > Generally speaking what you say is true, but not so much in this case. I'd assume that the kernel might want to reorder all disk accesses, including page reads and normal disk IO, for better performance. I'd also think this would be more useful on spinning disks than SSDs. I'm still not seeing why read access would be different from writes.
Description: Digital signature
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug