Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Nov 19, 2006 3:19 pm 
Offline

Joined: Sun Nov 19, 2006 3:11 pm
Posts: 1
Website: http://www.hardcoded.net
I've been trying to compile GCC 4.1.1 on my linode 100, but I quickly start to trash the swap and run out of IO tokens. Anyone has a solution?

For now, I added gcc 4.1.1 and glibc 2.4 to my package.mask, but I guess that eventually, other gentoo packages will require it.


Top
   
 Post subject:
PostPosted: Sun Nov 19, 2006 5:13 pm 
Offline
Senior Newbie

Joined: Fri Mar 04, 2005 7:13 pm
Posts: 16
I compiled the packages on my home computer and then uploaded the package to the Linode and installed it. That was the only way I can get some of the packages installed. It works really good.


Top
   
 Post subject:
PostPosted: Mon Nov 20, 2006 2:24 am 
Offline
Junior Member

Joined: Wed Jan 26, 2005 7:20 pm
Posts: 34
You could also just let it run. It'll take an ungodly amount of time, but it *will* compile.

But the best solution, I think, is to use distcc if you can devote the resources to it. Use at least one other system to pass off some of the compilation.


Top
   
 Post subject:
PostPosted: Tue Nov 28, 2006 11:21 pm 
Offline
Senior Newbie

Joined: Wed Oct 19, 2005 3:34 pm
Posts: 12
Website: http://telperion.info
AOL: omegaKon
Location: California
The problem with GCC is the amount of memory it takes to compile the DFAs. What I've done is set up a script to check /proc/io_status and when io_tokens falls below a certain level I killall -STOP the gcc processes on the system. When the level rises again, I killall -CONT the processes. It takes longer because of all the swapping but the system is usually responsive..

Code:
#!/usr/bin/ruby
###############
def io_status (token=nil)
    hash = {}
    File.open("/proc/io_status","r").each do |line|
      line.split.each do |item|
        key,value = item.split("=")
        hash.update( { key=>value } )
      end
    end
    return hash if not token
    return hash[token]
end


print Time.new, " * ", io_status('io_tokens'), "\n"
system('killall -STOP cc1')
system('killall -STOP cc1plus')
system('killall -STOP xgcc')

while true

  while io_status('io_tokens').to_i <  160000 ; sleep 6 ; end
  print Time.new, " + ", io_status('io_tokens'), "\n"
  system('killall -CONT cc1')
  system('killall -CONT cc1plus')
  system('killall -CONT xgcc')

  while io_status('io_tokens').to_i >  80000 ; sleep 6 ; end
  print Time.new, " - ", io_status('io_tokens'), "\n"
  system('killall -STOP cc1')
  system('killall -STOP cc1plus')
  system('killall -STOP xgcc')

end


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group