About

February 21st, 2009

Vidar is a fairly geeky guy who enjoys writing and using nifty software. He hopes this blog will present new niftyness to you, the adoring fans.

  1. June 9th, 2009 at 15:32 | #1

    Greetings,

    I represent a company for which I do some technical blogging for. I’ve stumbled upon your LINUX ATE MY RAM! page from the social networking sphere, and thought I’d ask permission to blog about this and link to your site.

    I’ve encountered newbies hitting the same roadblock, wanted to explain the common misunderstanding and link to your site at the bottom of my blog post.

    Is that okay with you?

    - Jon

  2. Vidar
    June 10th, 2009 at 05:50 | #2

    @ Jon
    Absolutely! Anything that increases awareness of the wonders of disk cache has my support.

  3. February 23rd, 2010 at 20:08 | #3

    Hi. Thx for your program : http://www.vidarholen.net/contents/junk/mandel.html
    I have tried to run it. After make I have :
    adam@adam-laptop:~/mandel_c_mthread/mandel$ make
    gcc -O9 -o mandel mandel.c -lpthread -lm -g -std=c99 -Wall -Werror
    cc1: warnings being treated as errors
    mandel.c: In function ‘calc_pixel’:
    mandel.c:292: error: ‘drgb’ may be used uninitialized in this function
    make: *** [mandel] Błąd 1
    Can you help with it ?
    Best regards

    Adam

  4. Vidar
    February 24th, 2010 at 06:36 | #4

    @ Adam
    My gcc 4.3.4-6 from debian doesn’t complain, but yours is right. Try simply editing the makefile and removing the word “-Werror” on line 4. Does that help?

  5. February 25th, 2010 at 16:05 | #5

    Yes. It works fine. I have AMD turion 64 X2 and Ubuntu 64-bit and 2 GB RAM. What number of threads should I use ?

  6. Vidar
    February 25th, 2010 at 17:56 | #6

    @ Adam
    2 should be fine.

  7. February 25th, 2010 at 19:26 | #7

    You are right. ( Why you use -j 3 ? ).
    I have changed one function
    calc_point
    and it works 2 time faster.
    http://fraktal.republika.pl/vidar.html

  8. January 29th, 2013 at 16:29 | #8

    Hi Vidar,
    Congrats for your blog! I’ve been reading your “linux ate my ram” mini-blog :-) Everythin ok, but I have one question. I have a server with 4GB ram, and memory monitored. I’ve observed that it always have enough memory (+/- buffers/cache line) with some graphs, but there are certain moments that the OS has needed a bit of swapping (only a few megs) but the free memory is always high. I’m pretty sure cause I generate memory graphs, and the amount of free memory is always high. What do you think about it?
    Thanks!

  9. Vidar
    January 29th, 2013 at 20:09 | #9

    @mik
    The kernel can be configured to swap out unused applications to make room for more disk cache to speed up applications in use. The degree to which this is done is called ‘swappiness’, configurable in /proc/sys/vm/swappiness.

    If swappiness is 0, the kernel will never swap out unused apps unless it’s completely out of RAM. If it’s 100, the kernel will frequently swap out unused apps to make room for disk cache to speed up in-use apps.

    The default in Ubuntu is 60, so there you will sometimes see some swap use even with plenty of free memory.

    Also, once something is swapped, it will just sit there until the memory is modified, freed or something else needs the swap space. This means that trace swap usage can be caused by a short memory spike long ago and/or of short duration (maybe shorter than your logging tool).

    This is a sign of Linux’ effectiveness in not wasting work that has gone into writing pages to swap.

  10. January 30th, 2013 at 07:03 | #10

    Fantastic Vidar. Great explanation :-)

  11. Adam s.
    March 9th, 2013 at 00:35 | #11

    Hi Vidar,

    I really like your linux memory caching page and was wondering if I could upload it to and publish it to an internal network? I would of course credit your site.

    Thanks,
    Adam

  12. Vidar
    March 11th, 2013 at 01:33 | #12

    @Adam s.
    Sure, anything to spread the page cache love!

  1. No trackbacks yet.

Ignore the following captcha and enter 'bunnies' in the field instead.