
{"id":114,"date":"2005-08-10T15:59:30","date_gmt":"2005-08-10T15:59:30","guid":{"rendered":"http:\/\/www.starcoder.com\/wordpress\/?p=109"},"modified":"2021-10-30T20:03:45","modified_gmt":"2021-10-30T20:03:45","slug":"if-you-have-it-youll-use-it","status":"publish","type":"post","link":"https:\/\/www.starcoder.com\/wordpress\/2005\/08\/if-you-have-it-youll-use-it\/","title":{"rendered":"If you have it, you&#039;ll use it&#8230;"},"content":{"rendered":"<p>Back when a G4 Powerbook was my primary computer, I had a gig of RAM and that was more than enough.  So when it came time for me to upgrade and I went with a G5, I figured 1.5G would be pretty cool because it was 512M more than what I had before, which was always enough.<\/p>\n<p>Unfortunately, it only took a couple of months of adjusting to having dual processors and a G5 that I started running out of memory&#8230;daily even.  I didn&#8217;t have to quit apps like I used to on my Powerbook to make a small fraction of CPU time available for the current apps I was using.  Having dual processors is just such a huge bonus, and it&#8217;s very rare that I actually peg both CPUs, usually only when compiling.  The result, memory filled up, swap started going nuts (there&#8217;d be times I would find myself using 1.25G of swap), and the machine just slowed down and kept me from getting work done.<\/p>\n<p>Well, a couple of weeks ago I finally decided to buy another gig of RAM, and it sure has made a big difference.  I don&#8217;t feel nearly as crunched for space, and I don&#8217;t have to go through every so often and quit apps that I haven&#8217;t used in awhile.  The thing is, if you have the RAM, you&#8217;ll use it.  I found that out pretty quickly when I glanced at Dash Monitors after a day of working and noticed that most of my RAM was being used.  Here&#8217;s a screenshot:<\/p>\n<p><center><img decoding=\"async\" src=\"\/blog\/static_links\/new_ram.jpg\" \/><\/center><\/p>\n<p>You&#8217;ll notice this screenshot also shows a new stat that Dash Monitors can monitor:  Swap space.  I&#8217;ve had a lot of requests for this feature, and I finally got around to implementing it.  A lot of people just wanted to know how large the swap files were (by looking in \/var\/vm), but I felt that didn&#8217;t really show how much swap the computer was actually using, especially when you start using so much swap that each swap file is 1G or more.  You might have a 1G swap file but only be using 50M of it, that makes a big difference.  I found that by running sysctl, you can get some good virtual memory stats:<\/p>\n<p><code><br \/>\n[Quiksilver:~] mike% sysctl -a vm<br \/>\nvm.loadavg: 0.26 0.25 0.25<br \/>\nvm.swapusage: total = 512.00M  used = 205.92M  free = 306.08M<\/code><\/p>\n<p>Then it was just a matter of interfacing with sysctl APIs directly from MTK and the widget plugin.  Works great, and I think it will be a good addition to Dash Monitors 1.4 when it is released.<\/p>\n<p>Anyway, I think this will hold me off for a good amount of time.  I still have 2 free DIMM slots, so I can always go for 1 or 2 more gigs, but by that time this machine will probably be getting close to the end of it&#8217;s life span.  In the mean time, I&#8217;m happy and definitely enjoying the extra RAM.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Back when a G4 Powerbook was my primary computer, I had a gig of RAM and that was more than enough. So when it came time for me to upgrade and I went with a G5, I figured 1.5G would be pretty cool because it was 512M more than what I had before, which was [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,16],"tags":[],"class_list":["post-114","post","type-post","status-publish","format-standard","hentry","category-dash-monitors","category-macintosh","post-preview"],"_links":{"self":[{"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/posts\/114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/comments?post=114"}],"version-history":[{"count":1,"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/posts\/114\/revisions"}],"predecessor-version":[{"id":677,"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/posts\/114\/revisions\/677"}],"wp:attachment":[{"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/media?parent=114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/categories?post=114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.starcoder.com\/wordpress\/wp-json\/wp\/v2\/tags?post=114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}