Ubuntu 10.10 recreating swap file after install of USBSTICK
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ubuntu 10.10 recreating swap file after install of USBSTICK
I made a mistake and during the setup created a seperate swap partition and noticed that using this on a usbstick hindered performance. So I want to simply add the swap to the same partition as root and the others. I used this ubuntu help file. Will this suffice:
Did you install your Ubuntu to a USB-stick? I can not see that clearly from your post. If you installed it to the USB-stick there should be no performance loss, only because you made a swap partition and not a swap file. Generally I don't think that all of the recommendations in the mentioned article make sense. Why should someone use more swapspace on a computer with more RAM, except for hibernation? And why should I use more swapspace on the same harddisk size only because I have more RAM. Maybe I don't see the point here. then please correct me.
there is a delay when opening up web browsers and basically multi-tasking. I am trying to figure out why it is sluggish. I am using a new laptop with usb 2.0. I have installed Ubuntu 10.10. multiple time on this memory stick and cannot figure out what it is. I have stipped it down and prevented the services. Help.
the article worked but I am still trying to figure out the intermittent lag between programs. I have installed 3 different installs including Lubuntu 10.10, Ubuntu 9.04 and now Ubuntu 10.10 and all three have the same issue. Any suggestions?
Use the free command to see if it is a swap issue. Make a benchmark of your memory-stick using the command sudo hdparm -tT /dev/sdX with X replaced by the letter of your memory-stick.
Is the lag only at the first start of your program? How much RAM do you have?
is it a persistent usb install with a casper-rw persistent file?
if yes then thats why
nothing you can really do about that except
if usb-creator made a casper-rw file on fat32 usb
then instead create a 2nd partition on usb, ext3, labeled "casper-rw"
delete the old casper-rw file also
this will only speed it up a bit
you culd also probably edit the persistent /etc/fstab and make sure it mounts the casper-rw partition with noatime
I did a straight install and used EXT4. It is an 8 Gig stick. I used a 512MG swap file. There isnt a casper-rw. The lag is happening about every 10 seconds. I can only move the mouse. I have disable most of the unnecessary services from starting up like NIS, Bluetooth Garbage and others. The system has 4 GIG of memory and I have tried using this stick on several systems with the same issue. Could the stick be bad or do usbsticks have a history of performance issues?
P.S
Linus72
Growing up I listened to a lot of Christian Metal, have you heard the group Stryper. They are one of my favorites.
Last edited by metallica1973; 10-26-2010 at 06:01 AM.
Here are the results of free and sudo hdparm -tT /dev/sdb1
PHP Code:
Fidel@Castro:~$ free total used free shared buffers cached Mem: 3977924 409232 3568692 0 32476 179516 -/+ buffers/cache: 197240 3780684 Swap: 524284 0 524284 Fidel@Castro:~$ sudo hdparm -tT /dev/sdb1 [sudo] password for Fidel: /dev/sdb1: Timing cached reads: 6104 MB in 2.00 seconds = 3053.59 MB/sec Timing buffered disk reads: 48 MB in 3.05 seconds = 15.72 MB/sec
The only difference that I can see from the other installs are that they are persistent as opposed to an install or that is could be a bad stick. This lag shouldn't be present.
Last edited by metallica1973; 10-26-2010 at 09:07 AM.
15 MB/s is a average rate, but this shouldn't be the cause for a lag. You wrote that you have the lag every 10 seconds, so I would assume that one of your applications or the system itself is making a write operation every 10 seconds, because write operations are slower with most flash disks. Maybe this slows your system down. I would try to get your /tmp, /var/cache and similar folders to a RAM disk and look if this will solve your issues.
With 4 GB of RAM you shouldn't need a swap partition/folder.
ramdisk, would that be what the live cdrom uses. If that is the case I willing to bet that is the issue. My other usbstick are using persistent files and there are not any issues with them. How can I see if there are using "RAMDISK"
and add that to /etc/grub.conf. When I tried to install Ubuntu 10.10 it complained about not having a swap area or partition. So I just went through with the install and added a swap area. So what I intend on doing it deleting the swap partition if there is one and adding a RAMDISK to /tmp and seeing what that does. I would like to add the additional space to root. Maybe I use gparted or something.
Would that suffice?
Last edited by metallica1973; 10-26-2010 at 10:28 AM.
The use of noatime, nodiratime or relatime can help disk performance for ext2, ext3, and ext4 filesystems. Linux by default keeps a record (writes to the disk) every times it reads from the disk. This was more purposeful when Linux was being used for servers and doesn't have much use for desktop use. This works good for almost all applications but Mutt that needs this information. For mutt, you should only use the relatime option.
@Metallica1972:
I think you misunderstood me, I meant to put your whole /tmp and the other directories into a ramdisk, not create a ramdisk into your /tmp.
For example, add to your /etc/fstab (not /etc/inittab, this file has a complete other purpose) this entry:
Code:
tmpfs /tmp tmpfs rw 0 0
Then reboot and look if your system is laggy, if it is try one of the other directories, like /var/cache or ~/.cache
I tried the noatime option and it does the same thing, lag. I will try moving all the !!#!!#$ into /tmp. Here is my /etc/fstab
PHP Code:
# /etc/fstab: static file system information. # # Use 'blkid -o value -s UUID' to print the universally unique identifier # for a device; this may be used with UUID= as a more robust way to name # devices that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc nodev,noexec,nosuid 0 0 # / was on /dev/sdb5 during installation
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.