Reply
Thread Tools
Posts: 5 | Thanked: 0 times | Joined on Jan 2006
#11
Originally Posted by RogerS
What size should I make the second partition?

I will be putting a swap file on there. I'd like to be able to put a lot of unnecessary applications on my 770 -- well, you know what I mean: lots of applications that I want to check out but won't use regularly, and apps I want as insurance (so that I can work on some file if I ever have to, for my job and such -- something like the gnumeric spreadsheet app). What size do you think should be big enough, without being too big and squandering space?
There are only quesses that can be offerred. First you make a guess based on certain "known truths" and then you tune. I've often heard Oracle say that swap space should be two times the amount of physical memory. Your swap space is known as virtual memory. Physical memory--RAM in this case--is what your programs load into and run on any computer. Swap is what is used when you "over commit the use of your physical memory". When you load in more programs than the physical RAM memory on the computer, then the operating system puts programs that are idle in the swap area on disk. For regular hard drives the mechanical portions of the drive are much slower than the swap that you will be creating i.e. you will be using solidstate memory for you swap!

Ok so this site says that the 770 has 64MB of RAM inuxdevices.com/articles/AT5858395674.html . Based on the Oracle guess then you'd want 128MB swap space. That would still leave you with 64mg of flash ram and 812MB on your MMC card. Now when you say you are going to install lot's of applications that is not the same as using memory or swap. The installation is what you'd put in your 812MB of space. To give you a perspective the largest app that I have installed so far is 2,408,576 while rsync is the smallest at 241,548. If you run xterm, then it will consume 2.4MB of memory. I think you'd have more than enough for both areas, if you use the 128/812 configuration. But remember Oracle's recommendation is for heavy hitting databases. 128 feels to big here.

You are really on a single user system and not on a multi-user system. I've noticed that I cannot seem to run two copies of the same application. If I run marbles, then hit the launcher for the second copy, the 770 switches me back to the first running copy in memory. If I go to the xterm command and run free I see
Mem total 61828; Mem used 58428; Mem free 3400; and Mem shared 0. It is interesting that this version of the free command does not have the cached count. Compare these number with two other linux systems
[drkludge@bagheera ~]$ free
total used free shared buffers cached
Mem: 514744 498552 16192 0 18036 199612
-/+ buffers/cache: 280904 233840
Swap: 2064376 0 2064376

This machine has 512MB used as a workstation. It has a 2gig swap partition and note that under the used column zero is used.

[drkludge@baloonew ~]$ free
total used free shared buffers cached
Mem: 2054724 2027660 27064 0 57600 1753672
-/+ buffers/cache: 216388 1838336
Swap: 2064376 696 2063680
[drkludge@baloonew ~]$ uptime
00:58:36 up 77 days, 10:50, 1 user, load average: 0.19, 0.06, 0.01
(I hope the formatting stays alined or it will be confusing to try and read these numbers.)
Here's a file server that has been up for 77 days. It has 2gig of memory and a 2gig swap partition. Only 696MB of the swap partition is being used. That's a terrible waste of a 2300+MHZ athlon 64. A 500MHZ AMDK62 junker would serve NFS and SAMBA just as good. The only hope for this configuration is that when a request for user data is made, then it will come out of the used, shared, buffers, or cached memory pools. The buffers/cache line tells you how fast the linux kernel can rearrange memory from the buffers and cached pools. You really hope that you don't take from Swap because it is on disk in this case. Note that this machine has a swap partition the same size as the physical RAM and not much of it is used.

Now the small memory foot print of the 770 is where a swap partition would really shine. I have 3400 free right now. If I fire up vim or gaim, then the O/S will really have to figure out where to put stuff. I think I saw where thoughtfix had success with just 16MB for a swap partition. An interesting project would be to try various sizes and record the results: 16MB, 32MB, 64MB, 96MB, and 128MB. The down side is that you'd have to reformat and completely reinstall your apps/data. You can allocate space for 128MB of swap in a partition but build it for only 16MB to start. The rest would go to your user data. If you find at some point, say, 32MB is the magic number, then you want to reformat the MMC card for 32MB swap/the rest user data.

For some reason I was amazed to find the free command on the 770. I found it more amazing to see the top command. The top command allows you to see what is going on in your 770 almost realtime. Hit the fullscreen button on the 770 before you run top in the xterm window. The memory numbers at the very top of the screen will be cut off if you don't. It's impossible to scroll up fast enough to see 'em.
Top shows
Mem used 54860K; Mem free 6968K; Mem shared 0K; Mem buffers 160K; and Mem cached 20840K.
If I alt tab with the keyboard to see marbles, then I find that the 770 has paused the game. I can only see small changes in the top numbers when I create another xterm _tab_ with Properties button>file>newtab while in xterm full screen mode.

Finally, just as I have noticed that GUI apps are inactive when you switch to another application, I wonder what the impact to memory and swap is when the machine powers down the display?

Hmmm...16MB, 32MB, 48MB, or 64MB may be good starter numbers. With 1Gig of MMC, I'd save most of that for music, videos, pdf books to read, applications, or application data files, etc. As you can see much of this is a guess. You'd have to take time to perform long term trend analysis. So go with 64MB and don't worry about it! As with all caching or swaping schemes you need memory to burn and you have it. The moment you shutdown the device, the caching and swaping have to build up again on the next boot.

I hope this helps. Perhaps I need to clean this up and put it on the wiki too as "page two" of the swap file article--bad pun intended.

Greg
 
Posts: 78 | Thanked: 9 times | Joined on Dec 2005 @ Devon, UK
#12
I'm still unsure as to whether it's really necessary to partition the card at all. Mount an ext2 partition using "mount -o loop" - requires the scratchbox mount command rather than the built in one. Use mkfs on a linux box to create the partition files (dd if=/dev/zero ... to make the empty files) then gzip and copy to mmc, unzip and mount.

It may be slightly less efficient, but makes changing the size of the (pseudo) partition much easier, or just add extra partition files as needed.
 
Posts: 11 | Thanked: 0 times | Joined on Jan 2006 @ Germany
#13
RogerS: I'm using a 1 GB MMC memory card, too. I repartitioned it so there's a 64 MB VFAT partition (exactly the same size as the original MMC that ships with the Nokia 770) and allocated the rest of the card to an EXT3 partition (which also holds the swap file). With such a Linux partition, you'd hardly need the FAT partition, I only use it to hold the files needed to restore the Extended Root Filesystem after a reflash (xterm, my Root.sh script, etc.).

dr_kludge:
An interesting project would be to try various sizes and record the results: 16MB, 32MB, 64MB, 96MB, and 128MB. The down side is that you'd have to reformat and completely reinstall your apps/data.
If you use a swap file instead of a swap partition, trying different sizes is easy, you can simply recreate the swap file. Keep in mind, though, that there have been reports of sizes > 24 or 32 MB to crash the device. (Haven't tested that myself yet.)

msaunby: That's an interesting idea worth a try. It's like using a swap file instead of a swap partion, you're using an ext3 loopback mount instead of a partition. The scratchbox mount command could be stored on the MMC, too, so it's always available after a reflash.
__________________
Wolfram Ravenwolf
Nokia 770 Blog
 
RogerS's Avatar
Posts: 772 | Thanked: 183 times | Joined on Jul 2005 @ Montclair, NJ (NYC suburbs)
#14
Originally Posted by dr_kludge
Now when you say you are going to install lot's of applications that is not the same as using memory or swap. The installation is what you'd put in your 812MB of space. To give you a perspective the largest app that I have installed so far is 2,408,576 while rsync is the smallest at 241,548. If you run xterm, then it will consume 2.4MB of memory. I think you'd have more than enough for both areas, if you use the 128/812 configuration.
Well, I was thinking that the use of the Extended Root Filesystem that Wolfram (aka Daniel) described actually put new installed apps on the second partition of the mmc:
Originally Posted by Wolfram
I recommend you move the root and user home directories onto the memory card (/root and /home/user) as well as user data like bookmarks (/usr/share/osso-bookmarks), settings (/etc/bluetooth/name, /var/lib/gconf, and /etc/osso-af-init/locale), even installed programs (/var/lib/install).
Please advise if I've misunderstood this.

Since I've seen it repeated so much, I guess I will start with a 24MB swap file until larger sizes are definitively shown to be more effective.

I guess the only problem I can see with all but 64 mb of the mmc card as the second partition -- as Wolf does -- is that it won't make moving a large movie from my PC to the 770 easy -- from earlier reports it seems a full-length movie can be larger than 700 mb. I won't be able to use USB transfer to the second partition.

Dr K, Wolf -- what would be the best/easiest way to transfer huge files to the 770 then?

Instead of 64/960 (W) or 960/64 (K), would this make something like 824/200 more optimal? Or 700/324 for more app room? Or 900/124 for longer movies?

I guess I don't want to be squeezed in the space I'm allocating for apps, nor do I want to waste any space. Not that I'm the only one who wants easy optimization.
__________________
N900 Guide Brief intro to the Nokia N900 (http://n900guide.com/)
Maemoan since July 2005 )
 
Posts: 5 | Thanked: 0 times | Joined on Jan 2006
#15
Originally Posted by RogerS
Dr K, Wolf -- what would be the best/easiest way to transfer huge files to the 770 then?
RogerS find one of those multi-memory format USB read/writers. Turn off the power on the 770 and remove the MMC card. Attach the multi-memory format read/writer and insert the MMC card into the device on a PC with the video or other multi-media support. Rip the move or other media directly onto the MMC card. If you are going to process the video/wav file first then rip it to a hard drive. Once done move the processed file to the MMC card. Eject the MMC from the read/writer. Place it in the 770 and boot the device. I would think this would be the fastest method available as far as data transfer goes and complexity.

Other options:
1.) If you have a wireless lan then use a PC or other device that can serve files via a web site. This method may be slower than using the read/writer. Plus additional complexity is required to set up a web server. I am presuming that you can use right click on the filename on the server and save it. I haven't played with the browser on the 770 yet.

2.) With a USB hub and other junk attached to the 770, then you could take a 1 GIG USB thumb drive and mount it on the 770 with your video. That will take some work to setup. I do have one mounted right now. I'll document it at some point.

3.) Set up ethernet networking on the 770. There again the complexity goes way up. First you'd have to download ssh/scp to your 770. Then you'd have to setup another PC with ssh or sshd. Finally, you'd have to configure the 770 to use ethernet networking.

4.) I am sure there's even more ways that will become available. For example, if someone ports an NFS or Samba client to the 770, then you would be able to mount these shares to the 770 and copy your desired files to the MMC on the device. At some point an ftp client could be created to access an ftp server with the files. Since python is now available on the 770, a bittorent client could bring files to the 700. All of these would require ethernet networking or a wireless LAN to be available to you.

5.) Unless someone beats me and compiles vblade for the 770, this is a very cool idea. Someone has already done this on the nslu2 device http://www.nslu2-linux.org/ .
http://www.linuxjournal.com/article/8149
http://www.coraid.com/support/linux/
http://en.wikipedia.org/wiki/ATA_over_Ethernet
http://sourceforge.net/projects/aoetools/

Greg
 
Posts: 11 | Thanked: 0 times | Joined on Jan 2006 @ Germany
#16
Yes, I've put everything that's modifyable by the user onto the Extended Root Filesystem (i. e. memory card's newly created and sym-linked EXT3 partition). Movies and such I'd also store in the home directory which is on that partition. For file transfer, I installed SSH on the Nokia 770, so I can upload/download files with scp/sftp (Secure FTP - should work with Windows FTP clients, too).

KDE users should give the "fish" protocol a try - then you can browse the Nokia 770's filesystem just like your local harddisks.

If you don't want to be restricted to fixed partition sizes, the method of creating files which are mounted as loopback would be a useful alternative, then you could recreate a bigger one more easily - but of course, with only a single partition, it would get unmounted when the USB connection is established. Every method has its advantages and disadvantages...
__________________
Wolfram Ravenwolf
Nokia 770 Blog
 
RogerS's Avatar
Posts: 772 | Thanked: 183 times | Joined on Jul 2005 @ Montclair, NJ (NYC suburbs)
#17
Originally Posted by Wolfram Ravenwolf
Movies and such I'd also store in the home directory which is on that partition. For file transfer, I installed SSH on the Nokia 770, so I can upload/download files with scp/sftp (Secure FTP - should work with Windows FTP clients, too).
Well, I got the 1 GB card for three reasons:
  • to be able to install apps without worrying about whether I needed to uninstall others I had looked at but wasn't actively using
  • to carry around some songs to listen to when WiFi is inaccessible -- the few I was putting on filled up the 64mb card before I knew it
  • to watch a movie when traveling -- maybe me, maybe to occupy my kids
The movie use is farthest from happening. So I guess I'll worry about getting such big files onto the mmc card when I need it, and if I have to figure out SSH and scp/sftp then, well, maybe I'll understand enough by then that it won't be an obstacle.

I do have a Compact Flash card reader and have used the approach Dr. K mentions with photos in my camera -- but it doesn't read mmc Maybe I'll be getting a new reader . . . My only question about that is, Will the PC see both partitions?

Thanks, both, for your help.

BTW, I'm posting this from Firefox running on the Mepis LiveCD. Just about to tackle the repartitioning and reformatting of the new 1GB mmc card. And, yes, I do always get into the water one toe at a time. How did you know?
__________________
N900 Guide Brief intro to the Nokia N900 (http://n900guide.com/)
Maemoan since July 2005 )
 
Posts: 5 | Thanked: 0 times | Joined on Jan 2006
#18
Originally Posted by RogerS
So I guess I'll worry about getting such big files onto the mmc card when I need it, and if I have to figure out SSH and scp/sftp then, well, maybe I'll understand enough by then that it won't be an obstacle.

I do have a Compact Flash card reader and have used the approach Dr. K mentions with photos in my camera -- but it doesn't read mmc Maybe I'll be getting a new reader . . . My only question about that is, Will the PC see both partitions?
Please note that I forgot the simplest way: hook up the 770 to your computer via USB. However, the reason that I didn't think of this earlier is that when you put your device in USB-host mode for the power injector devices, you cannot access the memory card at all. You'd have to use the flasher to disable this mode on the 770 to plug in the 770 directly again. LOL I thought I fried my device late Friday night until I fooled around with it enough.

Yep. A new reader may be in order. I have a 9 IN 1 job. It looks like it will take the RS-MMC but did not work. There are some RS-MMC dongles that adapt the memory to the USB bus. There again I found out I have an older model that did not work.

If you don't want to fool with ssh/scp just yet, then the reader will be the easiest method.

Most modern linux distros will see the FAT partition automatically via dbus. But you may have to manually mount the ext3 partition!?

I also played with a bluetooth dongle but did not have enough time to make PLAN work--it may not work.

As I have more time I'll be writing up how-tos based on my initial experience. I just received my device last week. Played with the flasher; Mounted stuff; Have usb hub and four things hooked to it. I found one device crashed the 770 when I hook it to the hub. Still wondering about that one.

Greg
 
RogerS's Avatar
Posts: 772 | Thanked: 183 times | Joined on Jul 2005 @ Montclair, NJ (NYC suburbs)
#19
After following the instructions for extending the root filesystem, I started to enter the commands for creating a swap file.

When I entered the first command, dd .... 24576
the message I got was
dd: /Root/swapfile: No such file or directory

I had downloaded the Root.sh file to my PC and then copied it to the 64mb mmc partition and ran it, as you described.

The only odd thing, of course, is that I must have done Step 2 twice -- once entering the commands manually and once in the Root.sh file.

Any idea what's going on and how I can proceed?

Thanks,

Roger

PS: Apologies for cross-posting -- I first entered this info at your website, but also would like to share the information here at itT forums.
__________________
N900 Guide Brief intro to the Nokia N900 (http://n900guide.com/)
Maemoan since July 2005 )
 
mk500's Avatar
Posts: 78 | Thanked: 1 time | Joined on Sep 2005 @ San Francisco, CA
#20
Originally Posted by Wolfram Ravenwolf
I found out how you can upgrade the Nokia 770 Internet Tablet's internal memory by extending the root filesystem to a memory card. My step-by-step guide with detailed instructions has been posted on the Maemo Wiki. Following the steps, one can expand the unit's memory, make it persist even through flashing, and protect the internal flash memory's durability all at the same time. All power users are welcome to check it out and see if it helps them to get even more out of our favorite Linux device. Here's the link: http://maemo.org/maemowiki/ExtendedRootFilesystem
Wow, thanks so much for your instructions and script, Wolfram. My 770 is so much more useful now.

I booted my PowerBook off a PowePC Ubuntu live CD and partitioned my 1GB rsmmc card as 800MB FAT16 and 200MB linux ext3. I ran your script, and it transferred everything perfectly, giving me much more space. I then set up the swap as you recommended. This made a huge difference in multitasking!

Thanks to you, I am now chatting with a friend via gaim, have two large web pages loaded, a PDF document open, and xterm as well. AND, I can still mount my fat partition on my mac via usb to transfer some mp3s over without interrupting anything.

Thanks!
__________________
Nokia N800, 4GB ADATA SD (Class 6)
Nokia 770, 1GB Sandisk RS-MMC
LG CU500 for 3G data service (uses my iPhone SIM)
http://www.markandjo.com/markblog
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 16:34.