Thanks for the tips. Here's the output: For **hdparm** [root@localhost root]# hdparm /dev/hda /dev/hda: multcount = 16 (on) IO_support = 0 (default 16-bit) unmaskirq = 0 (off) using_dma = 1 (on) keepsettings = 0 (off) readonly = 0 (off) readahead = 256 (on) geometry = 29777/16/63, sectors = 30015216, start = 0 For **vmstat** attached file: vmstat_op -Kshitij Date: Fri, 10 Dec 2004 00:32:32 +0000 From: James Wilkinson <james@xxxxxxxxxxxxxxxxxxx> Subject: Re: fedora-list Digest, Vol 10, Issue 167 To: fedora-list@xxxxxxxxxx Message-ID: <20041210003232.GC12299@xxxxxxxxxxxxxxxxxxxxxxxxxxx> Content-Type: text/plain; charset=us-ascii Kshitij Velhal wrote: > I have a m/c with following config > Intel Celeron 500MHz > 450 MB RAM > ATI 3D Rage Pro 1x/2x AGP > Microtek 17" Monitor Well, I have two 433 MHz Celerons and 288 MB RAM, and no performance complaints... > The system runs fine except the performance in GUI mode is very very poor. > > By term very very poor I mean: > 1. Can't switch between applications using Alt+Tab instantly (min 1 sec) > 2. Minimize/Maximize of window takes time > 3 sec > 3. If more than 3-4 applications are running it takes >5 sec to show K > Menu after clicking panel button > 4. GNumeric Save takes 2-3 sec and more as you use it for sometime > 5. In Openoffice apps opening Presentations, Docs, Spreadsheets takes > time 2-3 sec > 6. If system is running for long time, VLC, Mplayer fail to show video > only audio is available. Need to restart XServer or sometimes reboot > to resolve this issue. > . . . > > I do see a large Hard disk activity (HDD LED) while doing any of > these tasks. But CPU usage never goes to 100% and I don't think > anything hangs... Just the response is very slow. > > The memory usage is always around 400MB. And I don't think there are > may services running in background. Ed commented: > Most people unfortunately read this wrong and telling us you're at 400MB > unfortunately doesn't mean much since we don't know if you're reading it > right. Buffers and cached memory should be treated as "free" memory. Kshitij Velhal replied: > Memory usage I mentioned was from output of top command > ---Sample output--- > Tasks: 76 total, 2 running, 74 sleeping, 0 stopped, 0 zombie > Cpu(s): 5.2% us, 4.9% sy, 1.0% ni, 88.9% id, 0.0% wa, 0.0% hi, 0.0% si > Mem: 452204k total, 441960k used, 10244k free, 31304k buffers > Swap: 473876k total, 912k used, 472964k free, 238196k cached This is what Ed is talking about. Memory that is doing absolutely nothing isn't earning its keep. So Linux tries very hard to use it for something, even if it's only caching a copy of the files its's read from the hard drive: that will speed things up if the file is needed again. In your case, you've got 31304 K + 238196 K = 269500 K or over half your memory used for buffers and caches. If programs need it, Linux will just get rid of some of the cache and use that memory. Windows 2000 does much the same thing, but merely doesn't report buffer and cache memory as being in use. Now, that top line does tell us a bit more that's useful. Something's going on in the background, and that needs 5% of processor time to be spent in kernel mode. That figure's actually quite high. I'd like to introduce you to the vmstat command. Type in vmstat 2 and do one of your six tasks you mentioned. Press Ctrl-C to stop vmstat, and send us the result. It will give us a basic overview of where your system is spending its time. The output of hdparm /dev/hda *might* be interesting, too. > I am worried about physical memory usage. > I know that SWAP should be double the Physical RAM but I don't have > space on my HDD. 448MB is I think decent amount of RAM for my work > habits. That is a very old, very rough rule of thumb. On some systems it was necessary to have more swap than main memory, but this isn't the case for Linux (except on early 2.4 kernels). If you run out of swap, Bad Things happen. But you knew that. But swap that is never ever used isn't really earning its keep, either: it's merely insurance. You basically aren't using swap, judging by that top screen. Some swap usage is inevitable: it's when top or vmstat start reporting that you're actively copying to or from the swap file that you know you're short on memory. Hope this helps, James. -- E-mail address: james | ... and watched Richard Stallman ask one of the @westexe.demon.co.uk | waiting staff whether the spring rolls did indeed | spring and whether they would bounce. | -- Telsa Gwynne
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 0 0 912 3868 35692 247812 0 0 32 38 372 64 52 5 42 1 0 0 912 3804 35692 247812 0 0 0 0 1120 548 4 3 94 0 1 0 912 3804 35700 247812 0 0 0 44 1096 551 2 3 95 1 5 0 912 3016 35732 247928 0 0 70 0 1276 1255 31 12 51 6 3 1 912 3064 35484 245932 0 0 1018 0 1246 2056 35 16 0 50 1 0 912 2864 35404 243756 0 0 846 320 1221 785 52 8 0 40 1 0 912 2648 35176 241764 0 0 474 0 1188 750 74 7 0 19 3 0 912 3108 34812 240480 0 0 174 147 1163 929 83 7 0 9 2 0 912 3488 34300 236852 0 0 42 0 1134 761 87 10 0 4 0 0 912 6904 34300 237028 0 0 1 8 1177 752 50 7 43 1 0 0 912 6852 34308 237028 0 0 0 42 1182 615 18 5 77 1 0 0 912 6884 34308 237028 0 0 0 0 1208 643 21 4 75 0 1 0 912 7652 34304 236268 0 0 2 0 1194 813 49 13 38 0 1 0 912 7580 34340 236328 0 0 44 70 1226 629 58 13 20 8 0 0 912 7580 34340 236328 0 0 0 0 1137 610 16 4 81 0 0 0 912 7548 34364 236404 0 0 50 98 1104 585 49 17 25 9 1 0 912 6708 34064 234564 0 0 12 66 1112 607 63 12 26 0 1 0 912 3908 34080 234616 0 0 34 2 1150 569 80 20 0 0 1 0 912 11036 34068 233344 0 0 1 401 1322 918 62 10 27 3 2 0 912 7344 34080 233348 0 0 8 0 1197 753 48 7 46 0 0 1 912 8624 34220 235584 0 0 1132 0 1180 901 48 14 0 38 procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 0 2 912 3256 34212 239956 0 0 2564 236 1189 796 29 6 0 66 1 0 912 4612 32516 240164 0 0 4234 0 1299 1323 14 9 0 78 0 2 912 6968 30752 239180 0 0 2954 668 1282 860 17 8 0 75 0 1 912 3576 31052 242060 0 0 1066 623 1358 920 10 7 0 83 0 1 912 3128 30828 240392 0 0 902 0 1208 938 50 9 0 40 1 0 912 3204 28976 241088 0 0 700 158 1096 677 62 6 0 32 5 1 912 2936 26632 238164 0 0 708 95 1090 892 76 10 0 15 1 0 912 3276 26736 240088 0 0 1028 136 1071 689 66 9 0 26 0 1 912 4176 25552 240180 0 0 3376 102 1115 684 12 5 0 83 1 0 912 3032 25552 240832 0 0 326 0 1019 549 86 3 0 11 0 2 912 3536 25332 241220 0 0 4752 38 1110 738 36 5 0 58 0 1 912 3168 24860 241176 0 0 3068 0 1137 795 33 7 0 61 0 1 912 3540 24536 240280 0 0 2650 72 1080 1048 40 7 0 53 1 2 912 3680 24288 239856 0 0 2606 0 1103 732 31 6 0 63 2 0 912 3144 24192 238852 0 0 2186 120 1118 912 31 7 11 51 4 0 912 7844 24032 234104 0 0 618 0 1042 991 71 10 7 11 1 0 912 7060 24032 234112 0 0 4 0 1075 915 94 6 0 0 0 1 912 8084 23996 232800 0 0 26 44 1066 1137 82 14 0 4 0 0 912 8116 23996 232800 0 0 0 0 1044 673 6 4 90 1 1 0 912 8124 23996 232800 0 0 0 0 1093 733 22 4 74 0 0 0 912 8156 24000 232800 0 0 0 34 1077 794 17 5 79 0 procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 1 0 912 24196 24000 233488 0 0 348 0 1037 633 84 4 10 2 0 0 912 24200 24008 233488 0 0 0 80 1040 755 61 8 32 0 1 1 912 24072 24016 233668 0 0 94 0 1154 807 55 6 39 0 0 0 912 33052 24024 234036 0 0 454 2 1109 786 77 5 16 3 0 0 912 33052 24028 234040 0 0 0 110 1085 830 19 5 76 1 0 0 912 33052 24028 234044 0 0 2 182 1169 849 28 7 64 1 1 0 912 32932 24108 234112 0 0 74 0 1140 605 48 22 15 16 1 0 912 32804 24136 234112 0 0 10 112 1073 681 53 9 37 1 1 0 912 29604 24204 235552 0 0 754 0 1158 733 32 7 0 61 1 0 912 26308 24240 236288 0 0 384 0 1123 736 61 7 0 32 2 0 912 24092 24304 237196 0 0 318 208 1091 1056 64 12 0 25 1 0 912 23456 24324 237508 0 0 166 0 1064 839 86 7 0 8 1 0 912 18464 24336 238088 0 0 292 166 1039 585 87 7 0 6 1 0 912 15936 24340 238380 0 0 148 0 1035 565 87 5 0 8 0 0 912 14728 24392 239212 0 0 440 0 1062 597 70 8 1 21 1 0 912 13928 24400 239872 0 0 334 104 1038 700 44 5 45 5 2 0 912 12960 24408 240088 0 0 60 0 1033 1436 89 9 0 2 2 0 912 12960 24416 240088 0 0 0 88 1060 594 97 4 0 0 0 0 912 12832 24416 240180 0 0 46 0 1115 582 59 4 38 0 0 0 912 12768 24416 240284 0 0 52 0 1108 610 11 4 86 0 0 0 912 12776 24424 240284 0 0 0 28 1221 725 24 4 72 0 procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 1 0 912 8576 24428 240644 0 0 84 0 1164 2313 55 22 22 2 1 0 912 4864 24444 240664 0 0 2 376 1144 738 86 9 0 5 3 0 912 3172 24444 240708 0 0 0 2 1127 781 95 5 0 0 3 0 912 3216 24284 236908 0 0 2 513 1105 1050 89 12 0 0 0 0 912 7548 24288 236360 0 0 30 684 1138 691 36 8 48 9 0 0 912 7560 24288 236360 0 0 0 0 1221 723 25 5 70 0 1 0 912 7592 24296 236360 0 0 0 28 1149 606 19 4 76 0 2 0 912 7632 24296 236360 0 0 0 0 1197 783 57 4 38 0 1 0 912 17488 24296 235944 0 0 0 0 1065 706 96 4 0 0 0 0 912 17488 24304 235940 0 0 0 112 1103 542 3 4 93 1 1 0 912 17496 24304 235940 0 0 0 0 1124 589 80 2 17 0 0 0 912 31568 24304 235520 0 0 0 0 1097 925 66 5 28 0 1 0 912 31568 24308 235520 0 0 0 74 1251 1001 30 8 62 0 0 0 912 31568 24308 235520 0 0 0 0 1153 869 10 5 85 0 0 1 912 31440 24340 235636 0 0 68 30 1170 756 42 7 47 4 0 1 912 29152 24468 235720 0 0 108 0 1215 803 68 8 0 24 3 0 912 27168 24572 235792 0 0 88 0 1153 902 79 8 0 13