![]() ![]() |
Mar 8 2006, 01:45 AM
Post
#1
|
|
|
Group: Members Posts: 500 Joined: 17-January 04 From: St. Louis, USA Member No.: 1,478 |
I tried to natively compile a GUI program in X/Qt. However, during the make process, it often popped up a window saying that memory of the workspace was too low (suggesting me to close X/Qt). Frequently X/Qt was automatically shut down due to insufficient memory. Although I did enable 256Mb swap space, it was hardly used by more than half as I monitored.
Anybody had experience with this. Is such a compiling prohibitive in nature due to Z's memory limitation? |
|
|
|
Mar 8 2006, 05:09 AM
Post
#2
|
|
|
Group: Members Posts: 219 Joined: 10-February 04 Member No.: 1,807 |
You might have to change the "/etc/fstab" entry for "/tmp" to have it point to some other space, such as SD card, MMC card, or CF card. By default on the Sharp ROM, the "/tmp" directory is located in RAM.
|
|
|
|
Mar 8 2006, 08:10 AM
Post
#3
|
|
![]() Group: Members Posts: 1,099 Joined: 17-December 03 From: Athens, Greece Member No.: 1,210 |
some compilations (especially C++) requires a lot of memory but with a 256MB swap you should be fine in most cases.
Perhaps X/qt only monitor the physical free memory and doesn't take the swap into account? maybe you should try to compile in a console outside of x/qt |
|
|
|
Mar 8 2006, 08:15 PM
Post
#4
|
|
![]() Group: Members Posts: 2,808 Joined: 21-March 05 From: Sydney, Australia Member No.: 6,686 |
There is a env variable you can set, maybe TMP, cannot remember exactly, which you can use to point it at an alternate tmp location with more space. /tmp is definately not enuff.
|
|
|
|
Mar 9 2006, 08:03 AM
Post
#5
|
|
|
Group: Members Posts: 500 Joined: 17-January 04 From: St. Louis, USA Member No.: 1,478 |
thanks for the advice. I didn't notice any RAM usage during compilation because I don't have /tmp set in /etc/fstab (I don't even have the fstab in the chrooted environment), maybe I should set it. And I'll try the TMP env variable in X/Qt.
The interesting part right now is that although X/Qt crashed (you can't see the x/qt screen and "your memory is very low, please reboot" warning don't have x/qt in the list anymore), "cc1ql" is still compiling in the backgroud. It's been going for 20hrs now, yes it is a big C++ GUI application I'm trying to compile just for grins. |
|
|
|
Mar 13 2006, 10:43 PM
Post
#6
|
|
|
Group: Members Posts: 500 Joined: 17-January 04 From: St. Louis, USA Member No.: 1,478 |
finally built it. but seg fault
|
|
|
|
Mar 14 2006, 12:13 AM
Post
#7
|
|
|
Group: Members Posts: 271 Joined: 19-June 03 From: Beijing,China Member No.: 156 |
Originally, I would set the environment variable TMP to other directory. This works on my C3000.
|
|
|
|
Mar 27 2006, 01:41 AM
Post
#8
|
|
|
Group: Members Posts: 500 Joined: 17-January 04 From: St. Louis, USA Member No.: 1,478 |
Inside the chroot env
CODE export TMP=/tmp export TEMP=/temp which means TMP and TEMP should all be on my CF card. However, this does not stop the annoying memory shortage warning. The behavior is transiant. So I believe that such warning shows up whenever memory usage approachs 64MB limit (i.e.the physical RAM). It's ok if swap speed can catch up with the memory demand at the verge of overflow. Otherwise, X/Qt will crash. |
|
|
|
Mar 31 2006, 07:09 AM
Post
#9
|
|
|
Group: Members Posts: 41 Joined: 26-February 06 Member No.: 9,234 |
QUOTE So I believe that such warning shows up whenever memory usage approachs 64MB limit (i.e.the physical RAM). It's ok if swap speed can catch up with the memory demand at the verge of overflow. Otherwise, X/Qt will crash. I'm hardly the expert, but I wonder if you reduce the priority of the compile task very low, the system might be able to keep up? That's the "nice" command, right? Also, do you think it matters where you keep your source and output files? Might be worth moving them around; the different I/O rates could have an effect. Try compiling something smaller? Still, these sound like band-aid approaches. The OS should suspend applications automatically while it is keeping the swap situation and memory allocation correct, seems to me. I'm no kernel hacker, though. |
|
|
|
Apr 1 2006, 05:10 PM
Post
#10
|
|
|
Group: Members Posts: 500 Joined: 17-January 04 From: St. Louis, USA Member No.: 1,478 |
Do you know how to use the "nice" command? I'm not an expert either. But I doubt it will help because the memory usage soars only for a short period of time while CPU usage is low. I think that's the period of linkage , right? In my case, seems lots of object files need to be loaded.
my source and output files are all on a 2GB Kingston Elite Pro CF card. Compiling small programs are all fine. I'm looking into the configure file to tell it not to compile some impractical functionalities. I think the problem is in the Qt enviroment not in X. So I want to drop into a console to launch X and debian. However, "startx &" didn't call the .xinitrc file. Anybody know how to launch X/Debian from a console? |
|
|
|
Apr 2 2006, 04:45 AM
Post
#11
|
|
![]() Group: Members Posts: 1,565 Joined: 7-April 05 From: Sydney, Australia Member No.: 6,806 |
It might be that the progrom has a hardcoded /tmp and as such you may need to symlink, if it is a tmpfs (ie in ram) then shouldnt it grow into your swap space or was its hardcoded limit half of the physical ram
when in doubt post your /etc/fstab as that will tell us what the maximum size is |
|
|
|
Apr 5 2006, 02:48 AM
Post
#12
|
|
|
Group: Members Posts: 902 Joined: 22-May 04 Member No.: 3,385 |
I'm not sure if it's the tmpfs that gets mounted at boot, but am surprised xgjian is the only one complaining about it.
It's not XQt, this is Qtopia's problem, i.e. I get it too during compiling and even when just doing it in console. The only solution I have identified is open 10 or so progs at the same time. Then watch closely, as soon as the insufficient memory thing pops up, close some other prog. This works... But you have to keep closing and opening other programs, opening so that you have something to close when it pops up. It's really stupid, and for large compilations this doesn't make sense... If it is the tmp that gets mounted in fstab, then just changing the fstab doesn't work, because it gets mounted by /root/etc/rc.d/rc.rofilesys So would changing the references to tmpfs in rc.rofilesys work? Putting them on a CF or so? |
|
|
|
Apr 5 2006, 04:32 AM
Post
#13
|
|
![]() Group: Members Posts: 2,808 Joined: 21-March 05 From: Sydney, Australia Member No.: 6,686 |
does
export TMPDIR=/mnt/card/tmp help? i think the previous variable that was used, TMP, is the wrong one. see if TMPDIR provides more joy |
|
|
|
Apr 5 2006, 04:50 AM
Post
#14
|
|
|
Group: Members Posts: 902 Joined: 22-May 04 Member No.: 3,385 |
|
|
|
|
Apr 8 2006, 10:40 PM
Post
#15
|
|
|
Group: Members Posts: 902 Joined: 22-May 04 Member No.: 3,385 |
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th May 2013 - 11:31 PM |