[g1] Partitioning The Ram? - G1 Android Development

I understand that this probably will get moved and placed elsewhere under some long post but I'd like to make an individual thread and catch the eyes of people who wouldn't go through those threads to find this.
Any who can we partition the Ram like we did the sd card for apps?
Why?
To set and limit core apps and fix force closings [possibly] and making space for third party apps to run smoothly.
I don't know if it is possible but I do think it is a beautiful idea.

No, there's no way to accomplish anything like that(at least nothing I've ever heard of and I'm a software engineer)

I'm glad that you feel your idea is more important than everyone elses.
No, you can't partition RAM.

i don't know about android OS but ram drives can be created in linux
ram drive is important for ssd users and is created with tmpfs in fstab

There already are memory usage limits set for different types of applications. You can see this in init.rc. But it's not practical to "partition" the memory or limit the memory used by backgroud apps. As you can see the default policy is actually biased towards background services, etc.

samygent said:
i don't know about android OS but ram drives can be created in linux
ram drive is important for ssd users and is created with tmpfs in fstab
Click to expand...
Click to collapse
Yes, they can be created in Android. That is what compcache uses. But from what I read in the OP, that isn't what he is looking for. Maybe I misunderstood him but it sounded like he wanted to limit certain applications from being able to use too much memory. A RAM drive is available to the OS to manage, right? I don't know of any way to stop a specific application from using a RAM drive.

could he be talking about like how the spl partitions data cache and system?

you mount the ram drive like a normal disk and copy whatever files you want on that partition but sadly everything is lost when you reboot
i would like to try it but i don't want to brick my phone by messing up with my fstab

I think i understand he's question. Would it be possible to use g1 internal memory only for hungry tasks and swap partition for the rest ?
I wish it was but sadly it not possible. I hate it too when some silly task take internal memory space with is way faster then sd swap speed
and now that i think about it , ram drive would'nt really help simply because android applications take very low space on drive

samygent said:
you mount the ram drive like a normal disk and copy whatever files you want on that partition but sadly everything is lost when you reboot
i would like to try it but i don't want to brick my phone by messing up with my fstab
Click to expand...
Click to collapse
I was trying to do it based on some stuff I googled. I can't get it to work. It may not have support for it by default. It could be that Compcache loads what it needs to so that it can create a Ramdisk.
Post the steps that you would use and I will try it. It won't brick my phone, I'll just have to wipe and reload which is no big deal.

not gonna mess with fstab for the moment but you can try this
create a dir somewhere, mkdir -p /system/ram
and then
mount -t tmpfs -o size=5M,mode=0744 tmpfs /system/ram
you now have a 5mb ram drive
copy something on it to test

samygent said:
not gonna mess with fstab for the moment but you can try this
create a dir somewhere, mkdir -p /system/ram
and then
mount -t tmpfs -o size=5M,mode=0744 tmpfs /system/ram
you now have a 5mb ram drive
copy something on it to test
Click to expand...
Click to collapse
It might have to wait until I get off Hero but I will try it.

i'm using hero
funny thing is , i created a 100 mb ram drive, copy something on it and umount it. swap is almost full and 35mb free on internal ram
then tried to start hero browser and it started in about less then 2 secs

samygent said:
i'm using hero
funny thing is , i created a 100 mb ram drive, copy something on it and umount it. swap is almost full and 35mb free on internal ram
then tried to start hero browser and it started in about less then 2 secs
Click to expand...
Click to collapse
Interesting. Try setting it as a swap device. Are you sure it created it from RAM? Is there really 100Mb of RAM free?

yup my hero is a lot faster now
create ram partition, copy big ass file ( 80 mb hero file ) phone is very slow
ram and swap are used up to 100%
umount the ram partition , 50 mb free on internal ram and 50 mb used on swap partition
internal ram goes down to 1-2 mb free space after a few seconds but phone is very damn fast and swap is still filled up to 50 mb

samygent said:
yup my hero is a lot faster now
create ram partition, copy big ass file ( 80 mb hero file ) phone is very slow
ram and swap are used up to 100%
umount the ram partition , 50 mb free on internal ram and 50 mb used on swap partition
internal ram goes down to 1-2 mb free space after a few seconds but phone is very damn fast and swap is still filled up to 50 mb
Click to expand...
Click to collapse
You are basically just forcing the phone to use all swap instead of RAM. Some people set their swapiness to 100, which makes the phone use swap whenver possible. It's strange that swap would perform better than internal RAM. I have some ideas for making Hero run better but I can't get Compcache running on JACxHEROski. Which Hero are you running?

miketaylor00 said:
You are basically just forcing the phone to use all swap instead of RAM. Some people set their swapiness to 100, which makes the phone use swap whenver possible. It's strange that swap would perform better than internal RAM. I have some ideas for making Hero run better but I can't get Compcache running on JACxHEROski. Which Hero are you running?
Click to expand...
Click to collapse
You need to do it via rzstool

And her I thought I was an idiot for not being able to get get compcache running thru the userinit....

I'm sorry to hear that this seams like it can't be done currently but I'm glad I at least created some good conversation amongst everyone.
My whole idea for this was to partition the core apps and limit them/section them to only a certain amount of space to avoid them from force closing since they could have an appropriate amount of dedicated ram to keep them going clean and strong then after all that was taken care of third party apps could have a little space left to run a lot better.
I guess I'm more so just thinking about sectioning off the ram to apps then third party apps.

First off, don't get compcache running through userint.sh edit the user.conf file.

Related

whats is /dev used for?

I noticed that /dev partition doesnt seem to get used often. Was thinking about having the swap file sit there. It looks like the partition gets cleared out after a reboot which is fine by me. would gladly sacrifice some extra bootup time for faster swap file.
/dev is a pseudo filesystem containing handles for your hardware devices
do not touch it
/dev is actually mounted in RAM, so putting a swap file there doesn't make much sense.
I have a question:
If one does Apps2SD, you get a free space of around 75 MB on the data partition, right?
Can't this space be used for a swapfile instead of using the SD card? The internal memory should be faster than any SD card. Please correct me if I'm wrong.
djvw said:
I have a question:
If one does Apps2SD, you get a free space of around 75 MB on the data partition, right?
Can't this space be used for a swapfile instead of using the SD card? The internal memory should be faster than any SD card. Please correct me if I'm wrong.
Click to expand...
Click to collapse
yes but you will wear this memory out...then your phone will be useless... better to wear out a sd than wear out memory you cant replace

getting swapfile working on /data partition

Im trying out a theory. I running JAC Hero 2.3 and wanna try running the swapfile on the /data partition. I moved app_s over to /system/sd and used swapper app to create the swapfile but android doesnt seem to use it. when i run free It says Total/used/free are all 0 but the swap file is 34 meg. I tried putting it in a sub folder and chown root.root on the folder before setting up and still no luck. Anyone have any ideas why it wont work on /data or how to get it to work on /data?
Once you run swapper go into the setting and change the location of your swap file from /sdcard/swapfile.swp to /system/sd/swap.swp ( see sxfx post[url]
you don't want to do that. Swapping involves a lot of writing and erasing, it'll wear out your internal chip and you'll start experiencing reduced capacity, write cycles for nand are even less than for flash memory!
jubeh said:
you don't want to do that. Swapping involves a lot of writing and erasing, it'll wear out your internal chip and you'll start experiencing reduced capacity, write cycles for nand are even less than for flash memory!
Click to expand...
Click to collapse
not to mention, swapon as implemented (on every build i've tried) doesn't work on a swapfile stored on a yaffs2 partition
jubeh said:
you don't want to do that. Swapping involves a lot of writing and erasing, it'll wear out your internal chip and you'll start experiencing reduced capacity, write cycles for nand are even less than for flash memory!
Click to expand...
Click to collapse
Actually /sdcard/ is your fat32 portion of your sd card, /system/sd/ is the ext2/3 of your sd card.
Also I have done a bunch of research on this write/read fiasco just because of android.
And even if you set a swap file to your SD sure it will shorten your life of the card but it will still last you at least 2 years.
I have been using USB devices on linux as swap locations forever now and I still have thumb drives that have been used and abused for months and months as a swap place and they are still pulling strong.
As for the internal chip, Im not sure what you mean by that?
Even if you could put swap on the internal flash, its not going to be faster.
Putting swap on the internal flash will make things slower as the internal flash is about 3 to 5 times slower than a class 6 sdcard.
you're comparing using a flash drive for swap in a full blown computer that probably has around 1-4gb of ram, the swap file is hardly ever touched, unless you're running a lot of applications at a time. Dream has only 90 mb available to dalvik, and rosie is a big fat... lady... plus linux/dalvik manage memory in a different way, so files are often dropped to swap and they dont stay there for long (maybe in a 256 swap, but not in a 32 mb one).
the OP also is talking about moving his swap to his internal storage (chip, nand, whatever), as he thinks it's having no effect working from the sd card. Personally, i think that both a2sd and swapper are flawed. They're overcompensating for an os that was not meant to run on that device, and the real work should be in porting (as in developing, not just file-swapping as most "devs" do here) a launcher app that we can feel comfortable with running on a stock android system with stock (or slightly improved) libraries and that we can call comparable to rosie. Just look at ahome or dxtop or openhome, they're good, solid, great looking home replacements that work as well or better than rosie, but they run out of the stock libraries. I wonder why nobody has made a free, open source home replacement app yet
jubeh said:
you're comparing using a flash drive for swap in a full blown computer that probably has around 1-4gb of ram, the swap file is hardly ever touched, unless you're running a lot of applications at a time. Dream has only 90 mb available to dalvik, and rosie is a big fat... lady... plus linux/dalvik manage memory in a different way, so files are often dropped to swap and they dont stay there for long (maybe in a 256 swap, but not in a 32 mb one).
the OP also is talking about moving his swap to his internal storage (chip, nand, whatever), as he thinks it's having no effect working from the sd card. Personally, i think that both a2sd and swapper are flawed. They're overcompensating for an os that was not meant to run on that device, and the real work should be in porting (as in developing, not just file-swapping as most "devs" do here) a launcher app that we can feel comfortable with running on a stock android system with stock (or slightly improved) libraries and that we can call comparable to rosie. Just look at ahome or dxtop or openhome, they're good, solid, great looking home replacements that work as well or better than rosie, but they run out of the stock libraries. I wonder why nobody has made a free, open source home replacement app yet
Click to expand...
Click to collapse
You make a very good point about computer having 1-4gigs of ram and not needing a swap file.
Honestly I almost never run a swap file on a computer that has more then 1gig of ram.
Plus90% of the time when I do run a swap file is when Im running a live distro of linux of a cd, but also 90% of the time I run the distro from the flash drive instead of cd cause its much faster.
So now imagine how many reads/writes I abuse that flash drive with by running a full OS on it.
Also I don't understand how a2sd or swapper is flawed? Just because they do their job? I mean it's not really our fault that they made the G1 with a little less memory spaces then we would like it to have.
But that's exactly why we have tools like swapper and a2sd. Plus no one is really forced to run these roms on the G1 phone and those of us that do realize that we have to take extra steps in creating tools to help it.
And that's not only true for the G1 but anywhere in the computer world these days.
dwang said:
Even if you could put swap on the internal flash, its not going to be faster.
Putting swap on the internal flash will make things slower as the internal flash is about 3 to 5 times slower than a class 6 sdcard.
Click to expand...
Click to collapse
I'd like to spread swap over the sd and internal storage if possible -- should make paging a lot less evident if priorities are set up properly.
dwang said:
Even if you could put swap on the internal flash, its not going to be faster.
Putting swap on the internal flash will make things slower as the internal flash is about 3 to 5 times slower than a class 6 sdcard.
Click to expand...
Click to collapse
internal memory is faster. class 6 guarantees 6mbs read/write times but doesnt mean the bus can support those times. if you run a test copying something to /system/sd and to /data you will see /data is faster. as for those saying it will degrade the internal memory, that is not the case being the flash memory inside is designed to have much much much more read/write cycles. Think about it in a stock G1, this is where dalvik-cache is writen to as well as email, sms, user settings, cache for browser and uTube. Do not confuse internal flash memory to sd card flash memory
Are you sure about that? This guy has some test results and it indicates that a class 6 sdcard is much faster than the internal flash.
http://forum.xda-developers.com/showpost.php?p=4059520&postcount=15
MonkySlap said:
internal memory is faster. class 6 guarantees 6mbs read/write times but doesnt mean the bus can support those times. if you run a test copying something to /system/sd and to /data you will see /data is faster. as for those saying it will degrade the internal memory, that is not the case being the flash memory inside is designed to have much much much more read/write cycles. Think about it in a stock G1, this is where dalvik-cache is writen to as well as email, sms, user settings, cache for browser and uTube. Do not confuse internal flash memory to sd card flash memory
Click to expand...
Click to collapse
dwang said:
Are you sure about that? This guy has some test results and it indicates that a class 6 sdcard is much faster than the internal flash.
http://forum.xda-developers.com/showpost.php?p=4059520&postcount=15
Click to expand...
Click to collapse
That's interesting. Going to have to try that test out. I just noticed when xfering stuff to /data it was faster then to /system/sd. If it is then touche my friend.....touche

Is 32mb of Linux swap enough?

I know we are talking about a mobile OS here, but i remember the rule of thumb for Windows pagefile being 1.5 times the amount of ram...I am assuming the pagefile memory is similiar to the linux-swap. I could be wrong. So i did some searching and i found this on linux-swap.
The key question is how much? Older versions of Unix-type operating systems (such as Sun OS and Ultrix) demanded a swap space of two to three times that of physical memory. Modern implementations (such as Linux) don't require that much, but they can use it if you configure it. A rule of thumb is as follows: 1) for a desktop system, use a swap space of double system memory, as it will allow you to run a large number of applications (many of which may will be idle and easily swapped), making more RAM available for the active applications; 2) for a server, have a smaller amount of swap available (say half of physical memory) so that you have some flexibility for swapping when needed, but monitor the amount of swap space used and upgrade your RAM if necessary; 3) for older desktop machines (with say only 128MB), use as much swap space as you can spare, even up to 1GB.
[quote/]
So now we have 97,876 kb of memory showing in free. So should the linux swap be 48,938 kb or 48 mb instead of 32? Or because we have less then 128mb of memory should we follow the rule of giving it 1.5 (192 mb) times the amount of memory?
I am about to repartition my SDCard following the 1.5x rule. I have to research which commands to use to monitor swap...anyone know them off hand?
Edit:
I found this about making a swapfile instead of swap partition:
Swap file
As well as the swap partition, Linux also supports a swap file that you can create, prepare, and mount in a fashion similar to that of a swap partition. The advantage of swap files is that you don't need to find an empty partition or repartition a disk to add additional swap space.
To create a swap file, use the dd command to create an empty file. To create a 1GB file, type:
Code:
dd if=/dev/zero of=/swapfile bs=1024 count=1048576
I think the code needs to be changed. i am testing a few things now. I believe if=/dev/zero needs to be changed to something more amoung the lines of /dev/block/mmcblk0. Everything i try is getting a "dd: can't open '/swapfile': Read-only file system" I am assuming i have to mount it as rw but im not 100% on how to do that. Any help is appreciated.
Click to expand...
Click to collapse
/swapfile is the name of the swap file, and the count of 1048576 is the size in kilobytes (i.e. 1GB).
Prepare the swap file using mkswap just as you would a partition, but this time use the name of the swap file:
Code:
mkswap /swapfile
And similarly, mount it using the swapon command: swapon /swapfile.
The /etc/fstab entry for a swap file would look like this:
/swapfile none swap sw 0 0
Click to expand...
Click to collapse
Interesting, let me know if this helps with speed, I will definitely be using it.
Thats the plan =) I am going to repartition the sdcard now with the larger swap partition and then maybe down the line...we can switch from using a 3rd partition to using the swapfile instead.
I'm considering doing the same thing. What you posted makes sense. A bigger swap partition would free up ram for more active applications. Since I'm using a Hero Rom that would probably help haha.
I've already test this theory at swap partitions beyond 32MB including 48, 64, 192, up to 1gb at varying swap partition sizes. Also I tested multiple swappiness settings (20,30,40,60,80,100). The conclusion, bigger is not always better. The larger the swap partition became, the more the system had to swap out then back into memory, which took a hell of a lot of time (upwards of 5 minutes just to go from browser to home). General rule of thumb for swap files, just make a swap file the size that is enough, not one that is huge.
Good luck with your method of swap (which already exists, through methods like the app swapper), I know there are threads floating around where people use swap files, and end up switching to compcache or a swap partition because of higher stability.
andonnguyen said:
I've already test this theory at swap partitions beyond 32MB including 48, 64, 192, up to 1gb at varying swap partition sizes. Also I tested multiple swappiness settings (20,30,40,60,80,100). The conclusion, bigger is not always better. The larger the swap partition became, the more the system had to swap out then back into memory, which took a hell of a lot of time (upwards of 5 minutes just to go from browser to home). General rule of thumb for swap files, just make a swap file the size that is enough, not one that is huge.
Good luck with your method of swap (which already exists, through methods like the app swapper), I know there are threads floating around where people use swap files, and end up switching to compcache or a swap partition because of higher stability.
Click to expand...
Click to collapse
Ahh good to know, I tried searching for linux swap and not much came up so i didn't see any threads on this. The setup seemed to run faster, but that is part of Drizzy's v2.7 updates.
What commands did you use to watch the swap partition?
I was actually one of the first people I knew to put swap on the phone but I happen to know that the swapper application does that plus more! and even back in the day when I did it I couldn't use to much or my phone would lag! I recommend either 32mb or 64 mb of swap and just default swappiness but if you use swap I also recommend to underclock your phone to 383!
kickfliprock13 said:
I was actually one of the first people I knew to put swap on the phone but I happen to know that the swapper application does that plus more! and even back in the day when I did it I couldn't use to much or my phone would lag! I recommend either 32mb or 64 mb of swap and just default swappiness but if you use swap I also recommend to underclock your phone to 383!
Click to expand...
Click to collapse
I would only underclock if ur running hero...this seems to be the only rom underclocking really benefits you
damnitpud said:
Ahh good to know, I tried searching for linux swap and not much came up so i didn't see any threads on this. The setup seemed to run faster, but that is part of Drizzy's v2.7 updates.
What commands did you use to watch the swap partition?
Click to expand...
Click to collapse
in terminal type:
$free
it will show a section for swap. if it reads all zeros then the swap isn't being used.
Here's an example of my phone:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
You can see the difference of the swap being used, and the swap not being used.
damnitpud said:
I know we are talking about a mobile OS here, but i remember the rule of thumb for Windows pagefile being 1.5 times the amount of ram...I am assuming the pagefile memory is similiar to the linux-swap. I could be wrong. So i did some searching and i found this on linux-swap.
The key question is how much? Older versions of Unix-type operating systems (such as Sun OS and Ultrix) demanded a swap space of two to three times that of physical memory. Modern implementations (such as Linux) don't require that much, but they can use it if you configure it. A rule of thumb is as follows: 1) for a desktop system, use a swap space of double system memory, as it will allow you to run a large number of applications (many of which may will be idle and easily swapped), making more RAM available for the active applications; 2) for a server, have a smaller amount of swap available (say half of physical memory) so that you have some flexibility for swapping when needed, but monitor the amount of swap space used and upgrade your RAM if necessary; 3) for older desktop machines (with say only 128MB), use as much swap space as you can spare, even up to 1GB.
[quote/]
So now we have 97,876 kb of memory showing in free. So should the linux swap be 48,938 kb or 48 mb instead of 32? Or because we have less then 128mb of memory should we follow the rule of giving it 1.5 (192 mb) times the amount of memory?
I am about to repartition my SDCard following the 1.5x rule. I have to research which commands to use to monitor swap...anyone know them off hand?
Edit:
I found this about making a swapfile instead of swap partition:
Swap file
As well as the swap partition, Linux also supports a swap file that you can create, prepare, and mount in a fashion similar to that of a swap partition. The advantage of swap files is that you don't need to find an empty partition or repartition a disk to add additional swap space.
To create a swap file, use the dd command to create an empty file. To create a 1GB file, type:
Code:
dd if=/dev/zero of=/swapfile bs=1024 count=1048576
/swapfile is the name of the swap file, and the count of 1048576 is the size in kilobytes (i.e. 1GB).
Prepare the swap file using mkswap just as you would a partition, but this time use the name of the swap file:
Code:
mkswap /swapfile
And similarly, mount it using the swapon command: swapon /swapfile.
The /etc/fstab entry for a swap file would look like this:
/swapfile none swap sw 0 0
Click to expand...
Click to collapse
We switched from the swap file to the swap partition because it turned out that the swap partition was more stable wand was faster too. Also, we didn't have to set it up each time we flashed a new ROM and we could just have it activated by default. The problem with the swap file is that if you place it on the fat32 portion of your sdcard and then mount it to the computer, all hell breaks loose on your phone. I corrupted my card and was forced to re-partition everything because of that. As it is, I'm happy with my 32MB of swap with default swap of whatever the ROM dev chooses.
Click to expand...
Click to collapse
All this info is very good. Thank you everyone who replied. A lot of this info must be stashed away in an older thread somewhere no?
But after all this im going to give up on the swapfile and swap size. I do have a question for some of you that know more about this then me.
I want to run Hero after getting used to it. but after a few hours of running it, it slows down. i have followed every step the ROM devs have said and it still slows down. So i am wondering now, i noticed that Drizzy's ROM has an app and app_s folder in data. I am assuming that app_s is all the apps that go to the sdcard. But even a class 6 card is slower then the internal storage. So maybe moving apks like Rosie and some system apks to internal storage could speed up the way it Hero runs...am i wrong here or going down a path others have already tried?
damnitpud said:
All this info is very good. Thank you everyone who replied. A lot of this info must be stashed away in an older thread somewhere no?
But after all this im going to give up on the swapfile and swap size. I do have a question for some of you that know more about this then me.
I want to run Hero after getting used to it. but after a few hours of running it, it slows down. i have followed every step the ROM devs have said and it still slows down. So i am wondering now, i noticed that Drizzy's ROM has an app and app_s folder in data. I am assuming that app_s is all the apps that go to the sdcard. But even a class 6 card is slower then the internal storage. So maybe moving apks like Rosie and some system apks to internal storage could speed up the way it Hero runs...am i wrong here or going down a path others have already tried?
Click to expand...
Click to collapse
Actually class 6 is faster than internal storage, someone benchmarked the two in another thread that I can't currently find. Other people have tried already, it's probably best to read the first post of each hero thread, and make connections as to what dev's are doing, and what they're not doing. Their latest builds tend to be improvements upon previous builds, so if rosie and all the apk's are on the sdcard, its probably there for a reason whether it be speed or stability.
andonnguyen said:
Actually class 6 is faster than internal storage, someone benchmarked the two in another thread that I can't currently find. Other people have tried already, it's probably best to read the first post of each hero thread, and make connections as to what dev's are doing, and what they're not doing. Their latest builds tend to be improvements upon previous builds, so if rosie and all the apk's are on the sdcard, its probably there for a reason whether it be speed or stability.
Click to expand...
Click to collapse
I am going to research class 6 speeds, I can't see a memory card being faster then internal storage. but I've been wrong in the past...many times heh =)
Yeah the Drizzy ROM is a huge improvement in speed then the others...But there is still quite a bit of lag. I hope they can get Hero running as smooth as JF or Cyanogen's ROMs.
andonnguyen said:
in terminal type:
$free
it will show a section for swap. if it reads all zeros then the swap isn't being used.
Here's an example of my phone:
Click to expand...
Click to collapse
your free shows 97860 total ram, mine with cyanogen 3.9.1 shows 97880 totaly ram, but the phone is supposed to have 192megs of ram. what gives?
Sirus20x6 said:
your free shows 97860 total ram, mine with cyanogen 3.9.1 shows 97880 totaly ram, but the phone is supposed to have 192megs of ram. what gives?
Click to expand...
Click to collapse
Mine in TouchFlo 3D 2.7 shows 98328 for ram. The phone has 192mb of memory but not all of it is user accessible. Not sure why.
Edit:
Just found this on a site:
free will report slightly less memory as being in a computer than the actual total. This is mostly because the kernel (i.e., the core of the operating system) cannot be swapped out (i.e., the kernel always remains in main memory while the computer is in operation), and thus the memory that it occupies can never be freed. There can also be regions of memory that are reserved for other purposes, according to the specific system architecture.
Sirus20x6 said:
your free shows 97860 total ram, mine with cyanogen 3.9.1 shows 97880 totaly ram, but the phone is supposed to have 192megs of ram. what gives?
Click to expand...
Click to collapse
Some of the ram has been allocated for the function of phone and OS running
a 100 meg kernel? my computers kernel is less than 3 megs lol. I imagine that a few megs are saved for a frame buffer, and the os takes up most of the rest but still that's almost exactly half the phones ram. it seems like 100 megs is rather large for a phone OS
I remember windows XP taking half of the basic prebuilt computer's RAM when it first got released. it's not impossible. This IS the first hardcore phone os we've seen like android
So now we have 97,876 kb of memory showing in free. So should the linux swap be 48,938 kb or 48 mb instead of 32? Or because we have less then 128mb of memory should we follow the rule of giving it 1.5 (192 mb) times the amount of memory?
Click to expand...
Click to collapse
In all of the linux systems I have built over the years I have always used 1.5x as the rule... possibly more if I expected that I would upgrade RAM later on. I have always used a swap partition(keeps things nice and clean), but the ability to swap to a file has been around for years. All of the material I've read on the subject maintains that the file is just as fast as a swap partition, though I am willing to bet its lsightly slower due to FS overhead, though this out to be minimal - possibly a bigger deal on a slow embedded system like the G1..
I am going to research class 6 speeds, I can't see a memory card being faster then internal storage. but I've been wrong in the past...many times heh =)
Click to expand...
Click to collapse
Its all in the type of flash chip used and its interface... the interfaces are likely fairly equal(if not exactly the same). The speed of the actual media is entirely dependent on what you spend on it... in all cases for use as swap the speed is SLOW.
So maybe moving apks like Rosie and some system apks to internal storage could speed up the way it Hero runs...am i wrong here or going down a path others have already tried?
Click to expand...
Click to collapse
Sounds reasonable if the internal flash is faster than the flash on the sd card.
What commands did you use to watch the swap partition?
Click to expand...
Click to collapse
You might be interested in the output of the vmstat command(not sure if its available on android) and the file /proc/meminfo (similar to the free command).
You can also watch disk(flash) io in real time with the iostat command....
I did some testing on a random 1GB un-classed sd card I have here and I got 9MB/s writes and 12MB/s reads dding the entire card in Ubuntu.... I used this on the G1 with a swap partition and it lead to lots of force closes and long delays. Flash media will not be an ideal media for a swap file until read/write speeds approach 40MB/s or better and even then will still cause slow operation while swapping(just like a PC).
Based on the many factors with the speed of the platform.... the G1 either needs more actual RAM(find out whats up with the piece we can't get to), or less apps running simultaneously to maintain snappy speed.... and maybe some less heavy apps... 12 MB's of allocated memory is a LOT on a platform with only 96MB available to begin with....
IIRC someone ran benchmarks and found the internal flash mem was almost equivalent to a class 4 card (approx 4 MBps), this particular class 6 card im running right now is almost 8 MBps nearly double the speed of the internal flash memory

Default Swapfile on Optimus 3d

Hi,..sorry if its been asked before.
Ive looked for the swapfile thats been autoload on O3D, in froyo i found 120000 as default value, and on leaked gb by indoptimus i found 122880. Is it safe to raise the value, ive tried to raise it to 322680 (in my noob thought its 320mb), with default swappiness (60). then i open terminal and check free memory, its read as i changed. so im asking to the pro here (i mean any1 here except me /cause im noob), is it safe to change it? And where is the actual swapfile place ? Is it internal sd, eksternal sd, or inside internal sd partition (cause we lost much memory from our internal sd from the beginning).
thanks for all reply, pardon me for my bad english, and sorry for these noobs question.
edit : did my self an experiment,...idk but it seem the cpu clock is working better now / more efficient (checking with System tuner pro). do a multitasking (3 app / camera, dolphine browser, yahoo messenger, and the cpu remains under 60% usage /average.
Well it is a file swapfile partition that Andora used as paging. But here's where the theory, the bigger the better??? I take up room? etc, etc, etc.
Normally you use a paging 128 mg. This is how we have configured on your terminal. To say that the swap partition is created on the phone's internal memory, Osea in the 8 gigs. It saves space and from my point of view and experience of the HD2, not noticeable veneficios between 128 and 256, much less to 512mg.
Whether 128 is more than enough.
Thanks for your reply acura, its help me to know better. what i still dont understand is, o3d is come with 8gb of internal memory, and when we power on, its only give us less than 5gb free space, even if i uninstall bla bla bla apk from the system apk, its still not come even near 7gb. Does the rom took internal space?
do we have a chance to raise our ram to 1gb? Or is it a separated hardware?
danielkaboom said:
Thanks for your reply acura, its help me to know better. what i still dont understand is, o3d is come with 8gb of internal memory, and when we power on, its only give us less than 5gb free space, even if i uninstall bla bla bla apk from the system apk, its still not come even near 7gb. Does the rom took internal space?
do we have a chance to raise our ram to 1gb? Or is it a separated hardware?
Click to expand...
Click to collapse
well you uninstallthis and that and still your phone boots ain't it? all in all at least one gig is reserved for system android etc
jimakos29 said:
well you uninstallthis and that and still your phone boots ain't it? all in all at least one gig is reserved for system android etc
Click to expand...
Click to collapse
yup,..still boot and running just fine,..1 thing i notice is that now the HotPlug govenor is doing its job faster,..i mean, open app a, b and c, then i go to system tuner pro to check cpu usage before i put it to standby mode, and its really fast to get lower from 1ghz to 800mhz, 600mhz and stay at 300mhz(mostly single core is active), and the usage is between 5% - 25%.
power on back, open 3d games, press home menu, and check again, its dual core are running in about 70%-100% on 800mhz-1ghz.
guess im more enjoying my phone now,..less overheat on the display when the screen is up for browsing, playing.
whats still bothering me is, is it safe to put it that way? i mean, ive heard that swapfile sometimes must be formatted to get clean,..is it true? and if its true, how can i formatted it (ramzswap0 located in /dev/block/ramzswap0). for now, what i did is just swappoff it and then swappon it,...in hope to get it clean file (LOL,..noob way). any suggestion?
acura2201 said:
Well it is a file swapfile partition that Andora used as paging. But here's where the theory, the bigger the better??? I take up room? etc, etc, etc.
Normally you use a paging 128 mg. This is how we have configured on your terminal. To say that the swap partition is created on the phone's internal memory, Osea in the 8 gigs. It saves space and from my point of view and experience of the HD2, not noticeable veneficios between 128 and 256, much less to 512mg.
Whether 128 is more than enough.
Click to expand...
Click to collapse
so basically whats better?

RAM Expander Roehsoft not working on my tablet, how can i fix this?

Hello everyone,
I need some help with expanding RAM of an old android tablet of mine, more specifically, an Genesis GT-7204, using an SD card.
I rooted the tablet already and granted the app RAM Expander from Roehsoft root permissions, but when i try to use the app i get the following message: "This path is not available for swap!" Image below:
https://imgur.com/4MZ2l
The path i used was mnt/local:
https://imgur.com/6zUH7
Thanks in advance!
The images might be blocked, in any case i will post them here.
Personally have experienced that Virtual RAM ( aka SWAP RAM ) can only get created on a device's internal storage memory ( aka /sdcard ).
Hint: As path manually enter /data .
BTW:
Android since ever comes with virtual RAM ( SWAP RAM) feature. The internal storage memory used herefore is the /cache partition.
Also take note that an Android apps' memory usage by design is limited to some MBs. Even if you increase in Android's system file called build.prop the related amount, it's not sure that this is taken into account: an app's develeoper allows this or not.
And keep in mind that apps that did not fit in the RAM before without swap do not suddenly fit in the RAM.
Don't expect wonders using Roehsoft's RAM Expander. Probably you may not notice any gain in device's performance.
So i can only use my internal storage to add RAM? And not the SD card?
And to do this i have to manually set a path, but i am new at this, but i have to use /data or there is something else?
And in my case it is worth it, because this freaking tablet has only 500 MB of RAM!!!!!
jwoegerbauer said:
Personally have experienced that Virtual RAM ( aka SWAP RAM ) can only get created on a device's internal storage memory ( aka /sdcard ).
Hint: As path manually enter /data .
BTW:
Android since ever comes with virtual RAM ( SWAP RAM) feature. The internal storage memory used herefore is the /cache partition.
Also take note that an Android apps' memory usage by design is limited to some MBs. Even if you increase in Android's system file called build.prop the related amount, it's not sure that this is taken into account: an app's develeoper allows this or not.
And keep in mind that apps that did not fit in the RAM before without swap do not suddenly fit in the RAM.
Don't expect wonders using Roehsoft's RAM Expander. Probably you may not notice any gain in device's performance.
Click to expand...
Click to collapse
So i can only use my internal storage to add RAM? And not the SD card?
And to do this i have to manually set a path, but i am new at this, but i have to use /data or there is something else?
And in my case it is worth it, because this freaking tablet has only 500 MB of RAM!!!!!
pprg1101 said:
So i can only use my internal storage to add RAM? And not the SD card?
And to do this i have to manually set a path, but i am new at this, but i have to use /data or there is something else?
And in my case it is worth it, because this freaking tablet has only 500 MB of RAM!!!!!
Click to expand...
Click to collapse
Honestly I never used Roehesoft's RAM Expander on a real Android device and I'll never will use it: In my eyes it's crap. And, you'll find no serious confirmations in the WEB that it works as claimed.
Android for good reason doesn't come with SWAP feature. Android's Memory Manager frees RAM if necessary.
It's on you to play around with Roehesoft's RAM Expander. Good luck.
My last 2 cents here:
SWAP is a place on the internal storage memory (usually a dedicated partition) that is used to store programs or data that can't fit in memory, like when a program grows more than the available RAM (BTW: In the world of Windows this space is called Swapfile.sys ). SWAP is way slower than RAM, so when you create / enable SWAP the phone gets slower, but at least the program can work.
All the stuff that can't or shouldn't stay in your RAM is written out to SWAP and read back in when needed. This means that the SWAP medium needs to be fast and resilient to lots of writes.
IMHO using an external SD card as SWAP fails on both counts. It is slower at reading/writing than a phone's internal drive, and each of its constituent sectors can only be written to a limited number of times before they wear out and can no longer reliably store data.
SC pl

Categories

Resources